Welcome to WebmasterWorld Guest from 107.22.86.42

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

ServerAlias via .htaccess?

     
10:46 pm on Mar 26, 2008 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 25, 2006
posts:409
votes: 0


Hello,

I am trying to get the following code working in my site - but the only snag I am running into is that this host won't allow me to edit the httpd.conf file, and nor will they. (i am running a test with this host with wordpress mu, and so far I am not pleased with this host)

I DO have access to php.ini, and .htaccess. Is there anyway to add the following serveralias wildcard command to take effect for my site in any of the other files?

ServerAlias *.domainnamehere.tld

What other options can I follow without the use of my httpd.conf file?

10:48 pm on Mar 26, 2008 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 25, 2006
posts:409
votes: 0


By the way - when I try and view subdomain blogs with my current setup I get a 404 Forbidden error. As of now I have the following in my A (Hosts) DNS entry list:

* Points to IP Adress

@ Points to IP Adress

*.domain.tld Points to IP Address

I setup all of these entries in an attempt to get Wildcard DNS working. I AM able to ping any made up subdomain of my domain now thoug - with these entries. Am I missing an entry, or do I have one too many?

10:50 pm on Mar 26, 2008 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 25, 2006
posts:409
votes: 0


Would getting a dedicated IP address fix this problem? When I try and put my website's IP address in my browser - I get a 404 Forbidden error as well. So basically it looks like its forbidden, being that I share the IP with other websites. Any other thoughts? I think i have provided enough information at this point. :-)
3:54 pm on Mar 27, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


If you don't have a dedicated IP address, then in addition to setting up your DNS, you will also have to ask your host to configure the server to recognize requests for the additional subdomains. Otherwise, since the server is name-based, it won't know that those subdomains belong to you and should be 'sent' to your main domain's file space.

Some hosts will do this for you, but many either won't do it, will require you to use cPanel (or similar) to set up the subdomains one-by-one as "add-on domains), or will want to charge you for the additional "domains."

A dedicated IP address often makes this much simpler, since the server knows that all requests for that IP address (regardless of hostname) belong to you and should be 'sent' to your file space.

Jim