I'm using Apache 2.2.10 (Unix), and want to redirect all the request of
http://mydoamin.com to
http://www.mydomain.com In my .htaccess, I added
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.mydomain.com$ [NC]
RewriteRule ^(.*)$
http://www.mydomain.com/$1 [L,R=301]
But it does not work. Should I restart the server for the new .htaccess?
Or should I use httpd.conf instead of .htaccess?