Hello, I just came to know that its not good to have both non www and www with domain for the search engine point of view, so i have tried to redirect mysite.com to www.mysite.com with the help of .htaccess it works fine but the problem is it doesn't work for subfolders like i have sub directory abc.com/folder that directory is having its own .htacces so its not reading the root .htacces. The other way i have found is to do it by editing httpd.conf check here http://www.askdavetaylor.com/how_do_i_add_a_301_redirect_to_my_apache_httpdconf.html now can anybody please tell me by doing it with the help of httpd.conf will its effect be the same as that of .htaccess? and what are experts opinions about 301 redirect, whether its good for SEO or not?
.htaccess is mostly used by hosting sites when you don't have access to httpd.conf When you have access to it, redirection can be done in any of the files. I prefer .htaccess because you don't have to restart the webserver for the changes to take effect.
In fact i am having my own server i just made changes in httpd.conf and its working perfect as i mentioned doing with .htaccess may trouble if you have .htaccess in sub directories
Sorry i cant answer your question but i've be grateful if you could give me a pointer on how to redirect using .htaccess so that all traffice goes to http://www.mysite.com rather that http://mysite.com ?
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www\.mysite\.tld$ [NC] RewriteRule ^(.*)$ http://www.mysite.tld/$1 [R=301,L]