TommyWillB
Registered
I have two domain names that I want to point at the same document root. Basically I want this site to work exactly the same regardless of which domain name you entered using.
So I have the site set up as domain #1 and a virtual set up with domain #2. Domain #1 has these settings:
The virtual is set up like this:
So the problem I am having is with this virtual.
When I first enter the site with domain #2 it looks fine... Links with filenames and trailing slashes work fine. But if I hit a link with no trailing slash then suddenly I am popped back to Domain #1.
I thought the ServerName comman was supposed to keep that from happening.
What am I doing wrong?
So I have the site set up as domain #1 and a virtual set up with domain #2. Domain #1 has these settings:
Code:
ServerName (domain name #1)
DocumentRoot "/Library/WebServer/Documents"
.
.
.
<IfModule mod_dir.c>
DirectoryIndex index.php index.html
</IfModule>
Code:
<VirtualHost *>
ServerName (domain name #2)
DocumentRoot "/Library/WebServer/Documents"
</VirtualHost>
When I first enter the site with domain #2 it looks fine... Links with filenames and trailing slashes work fine. But if I hit a link with no trailing slash then suddenly I am popped back to Domain #1.
I thought the ServerName comman was supposed to keep that from happening.
What am I doing wrong?