chetanmadaan
08-06-2010, 12:56 AM
ok,
here is the code most of the SEO companies prefer to have so that users using the site without www should be redirected to www
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]
but when a user tried to open up domain.com/blog he gets redirected to www.domain.com and not the /blog page he was suppose to be.
so, is there a way where we can use 301 redirect but also keep them landing to the url they entered???
Thanks in advance.
here is the code most of the SEO companies prefer to have so that users using the site without www should be redirected to www
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]
but when a user tried to open up domain.com/blog he gets redirected to www.domain.com and not the /blog page he was suppose to be.
so, is there a way where we can use 301 redirect but also keep them landing to the url they entered???
Thanks in advance.