Forums

[resolved] Subdomains redirect to defaultwebpage.cgi (9 posts)

  1. mat4020
    Member
    Posted 1 year ago #

    I have a website (zischina.com) setup as a wordpress multi site the additional sites are added as sub-domains.

    The problem is, any sub-domain redirects me to the cgi-sys/defaultwebpage.cgi page.

    I've talked with my host to enable mod_rewrite (permalinks work) in apache and I've checked to see if my .htaccess file is correct, and they both seem to be. I also have a A record set up like this: *.zischina.com. A 202.146.219.22.

    This website: http://www.just-ping.com/index.php?vh=year6.zischina.com&c=&s=ping shows that year6.zischina.com is pinging correctly to the IP 202.146.219.22.

    Any ideas?

  2. mat4020
    Member
    Posted 1 year ago #

    I should also mention that this was working fine until the host moved my server to a different county (at my request).

  3. The new server needs the httpd.conf file edited to handle wildcard subdomains. Or ... any subdomains.

  4. mat4020
    Member
    Posted 1 year ago #

    I asked the host last week to do this:

    Apache must be configured to accept wildcards.

    1. Open up the httpd.conf file or the include file containing the VHOST entry for your web account.
    2. Add this line:

    ServerAlias *.zischina.com

    Is that what you mean by editing the httpd.conf file? Is their something else that should be added?

    (Also, I have another subdomain outside of the WP Network that works correctly - http://test.zischina.com/)

  5. Yes. BUT. You have to put them in order :)

    IIRC named subdomains go ABOVE wildcard.

  6. mat4020
    Member
    Posted 1 year ago #

    Ipstenu,

    I really appreciate the help. So, what should I ask the host to do?

    Move "ServerAlias *.zischina.com" up the list?

  7. Kind of...

    It depends a little on your version of Apache and how it's all set up.

    Basically, what I did was change ServerAlias www.yourdomain.com to ServerAlias *.yourdomain.com

    So the whole thing looked like this:

    <VirtualHost 67.15.245.5>
    ServerAlias *.yourdomain.com
    ServerAdmin webmaster@yourdomain.com
    DocumentRoot /home/yourdoma/public_html/
    [blah blah]
    </VirtualHost>

    If you have a named subdomain, ABOVE that would go:

    <VirtualHost 67.15.245.5>
    ServerAlias test.yourdomain.com
    ServerAdmin webmaster@yourdomain.com
    DocumentRoot /home/yourdoma/public_html/test
    [blah blah]
    </VirtualHost>
  8. Andrea_r
    team pirate
    Posted 1 year ago #

    Move "ServerAlias *.zischina.com" up the list?

    Down the list.

  9. mat4020
    Member
    Posted 1 year ago #

    Thanks for all the help! I just sent a link of this thread to the host support and they got everything worked out.

    Thanks again,

    Matt

Topic Closed

This topic has been closed to new replies.

About this Topic