Jump to content

Redirect issues


Recommended Posts

i'm using 1.5.5.0. i have no problem accessing my site without www but when i try to add www manualy to some links(category, product) it doesn't redirect properly and adds "?controller=404". I added screenshot of my Seo&Url settings. Google indexed all my pages as "site.com" just fine without "?controller=404". Any advice on how to make them work with www without messing up SEO?

Thanks

wkeFw8l.png

 

Link to comment
Share on other sites

Does not work. Except for the home page. Any other domain returns a 404. It is not really important though for me. I use non-www only. I dont know why anyone would manually put a www on some url except the home page. But it is an observation i made when someone had a similar question.

Edited by indus (see edit history)
Link to comment
Share on other sites

Ok i have solved this problem, with some tip from here

 

http://www.prestashop.com/forums/topic/2131[spam-filter]tip-15-and-custom-htaccess/

 

 

I used the code :

 

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

 

 

and placed it at the top of the .htaccess file above the comments and it works fine now. Seems like the problem is with prestashop's default htaccess rewrite code.

 

 

Now, all my www urls redirect properly to non - www ones without a 404 error. Though i still maintain its useless for me because i always used a non-www site, but probably useful for  those who have had a www in their url's  for a long time and decide to move to a non-www one so all their old links on google can redirect properly.

Edited by indus (see edit history)
  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...