flix Posted August 27, 2011 Share Posted August 27, 2011 I'd like to redirect all non www links to my site to be www, so I've used this code in .htaccess RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] That works great for the homepage, but for all inner page links, it's failing to redirect. So http://mystore.com/bluewidget stays that way, when I'd like it to auto redirect to http://www.mystore.com/bluewidget. Has anyone encountered this problem? I'm after the htaccess code that will auto redirect every single non www link ideally - I could 301 each page, but the store has around 1000 pages so it'd take me a lifetime. I've never encountered this issue with other sites using the code above before, only my Prestashop store. Any ideas? Link to comment Share on other sites More sharing options...
mozack Posted October 21, 2011 Share Posted October 21, 2011 Hi, sorry, i just check your post now, If you do not found an answer, here we go: The right mod is: RewriteCond %{HTTP_HOST} ^yoursite.com RewriteRule (.*) http://www.yoursite.com/$1 [R=301,L] Regards Mozack Link to comment Share on other sites More sharing options...
carolynccourtney Posted November 8, 2011 Share Posted November 8, 2011 If you need help with htaccess. Just scream. I'm sure we can have a look. There area lot of good tutorials for "301 redirect index.html to the root", forums, articles, blog entries there. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now