I’d like 4 URLs to end up in the same place. I’m using ServerAlias settings in my virtualhost config to accomplish it. For 2 ServerAlias entries, it works, but not for the third. Here are the URLs that should end up in the same place:
- libbyh.com
- http://www.libbyh.com
- libbyhemphill.com
- http://www.libbyhemphill.com
My libbyh.com virtualhost files looks like so:
<VirtualHost *:80>
ServerName libbyh.com
ServerAlias www.libbyh.com www.libbyhemphill.com libbyhemphill.com
ServerAdmin libbyh@gmail.com
DocumentRoot /var/www/html/libbyh.com
DirectoryIndex index.php
<Directory /var/www/html/libbyh.com/>
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
The rewrite-related bits of .htaccess:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
libbyhemphill.com and http://www.libbyhemphill.com both end up in the right place, but http://www.libbyh.com returns 404s. I can’t find anything in the logs that tells me why. I tried dig for http://www.libbyh.com and get the DNS settings I expected, but ping fails. What’s up? Where else can I look? I changed both DNS nameservers and moved the site to a new server on Thursday (now Saturday). I added A records for http://www.libbyh.com and libbyh.com on the new nameservers. Is there a DNS setting I screwed up?
libbyh.com, libbyhemphill.com, and http://www.libbyhemphill.com all have 216.47.
158.239 whereas http://www.libbyh.com has 216.47.156.239Are you sure your DNS is correct for http://www.libbyh.com?