hello i'm trying to setup apache httpd.conf such that when the client types in http:/
/domain.com it will redirect to http:/
/www.domain.com
In my httpd.conf file, I have this written:
<Directory "/var/www/html">
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain1\.com$ [NC]
RewriteRule ^(.*)$ http:/
/www.domain1.com/$1 [R=301,L]
...
</Directory>
I also verified the rewrite module is loaded.
Any idea why it's not working? When I go to http:/
/domain.com I get a could not find site error. Logs are no help either.
Thanks!
[edited by: tedster at 4:27 am (utc) on Feb 21, 2012]
[edit reason] avoid the auto-linking [/edit]