I want to redirect all my /mydomain.com to http://www.mydomain.com and also www.mydomain.com/index.html to www.mydomain.com what exactly do i need to type in my .htaccess file
RewriteEngine on RewriteCond %{HTTP_HOST} ^mydomain.com [NC] RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301] That should do it, I think. I am not sure about the .com/index.html going to the .com/ though Here is where I found it: http://www.trevorfitzgerald.com/2007/03/force-www-using-an-htaccess-301-redirect/
Thanks for your help, has anyone got any info on the other part i.e. redirecting mydomain.com/index.html to mydomain.com.
What kind of site are you running? Can you put up the code for the .htaccess over here? Future Asia Toys Websites