Results 1 to 4 of 4
I have a server with a couple domains on it.
I am running into a problem when users omit the www. on my domains.
How can I make it so ...
- 09-13-2005 #1Just Joined!
- Join Date
- Aug 2004
- Location
- SLC, UT
- Posts
- 67
No WWW problem
I have a server with a couple domains on it.
I am running into a problem when users omit the www. on my domains.
How can I make it so whether they call www.domain.com or domain.com they both go to the same place.
I have tried doing it in the httpd.conf but maybe I am doing it wrong.
Thanks!
- 09-13-2005 #2Just Joined!
- Join Date
- May 2005
- Posts
- 52
DNS.
I.e. if you have www.domain.com as a DNS entry, but you do not allow wildcards and your virtual host only has www.domain.com http://domain.com will not work
Put in wildcard, or better create a dns record for domain.com AND www.domain.com and add both to your vhosts.
(Please correct if I am wrong)
- 09-13-2005 #3Just Joined!
- Join Date
- Aug 2004
- Location
- SLC, UT
- Posts
- 67
Ok my bad - didnt fully explain problem.
My DNS is fine, it gets the user to my server.
The problem I am having is it the user types in www.domain.com they go to the index page. If they only type domain.com they go to a directory listing.
What can I do about that?
- 09-14-2005 #4Just Joined!
- Join Date
- May 2005
- Posts
- 52
Oh. I remeber that was default behavior on older apache. What version are you running? You need to not allow indexes. I think on newer (2.0X) apache that is default on everything excepts users sites from their home directories. Again not real sure.
Depending on which version you have look in the commonhttpd.conf fiel for something like:
Options -Indexes FollowSymLinks MultiViews
where -indexes means no indexes.
Or add that directive to your virtual host config for that server.
<Directory /web/docs>
Options -Indexes FollowSymLinks
</Directory>


Reply With Quote