I'm running CentOS 6.0 and am trying to make mod_rewrite remove the www from any URL's prefixed with it. Here's the code I have in my httpd.conf:
NOTE: I am using a VPS with full root access so I am not using .htaccess files or any "per-directory" settings.
RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.aaronjwood\.com$ RewriteRule ^(.*)$ http://aaronjwood.com/$1 [R=301,L] This is working fine for all pages except that the URL will be written to http://aaronjwood.com// (notice the two slashes) or http://aaronjwood.com//contact.php. Can anyone help me figure out why this is happening?