Jump to content

URL Redirect Problem


Recommended Posts

Hey,

I have a problem with the redirection of the PrestaShop url and, following many attempts, am unable to find a solution. Basically, it is the same issue as the thread "HAving to user WWW. in front of site URL address" where I am unable to login and add items to the cart without the 'www' prefix. However, unlike that thread, I have my shop in a sub-directory (ie. http://www.mysite.com/shop'>http://www.mysite.com/shop) and I have the rest of my server set up to redirect everything from 'non-www' to 'www'.

I have used the following code in my .htaccess file in the root of the site (ie. http://www.mysite.com):

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]



If I add something like:

Options +FollowSymLinks 
RewriteEngine on 
RewriteCond %{HTTP_HOST} ^mysite.com/shop [NC] 
RewriteRule ^(.*)$ http://www.mysite.com/shop/$1 [L,R=301]



to the .htaccess in my shop's directory it doesn't resolve the issue.

Please help!

Thank you :)

Link to comment
Share on other sites

Thanks for your help Brez but I'm still having no luck.

I managed to get http://mysite.com/shop to redirect to http://www.mysite.com/shop, however, there is now an infinite loop of redirects. It persists to redirect to http://mysite.com/shop!

I have checked everything in cpanel and can't seem to work it out.

Is it possible for PrestaShop to run off the non-www url?

Cheers :)

Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • Create New...