mackster Posted October 21, 2013 Share Posted October 21, 2013 (edited) hi guys... I have a massive issue with my prestashop install. I have friendly URLs enabled, and my server htaccess file has been configured and mod_rewrite has been turned on. I turned this on at both the root of my hosting and on the specific domain name to make sure its working. I have also upgraded to the latest prestashop install, The problem i am having is that when my pages are being indexed by google, the url is correct - but upon clicking the url a "?controller=404" is added to the end of it so the user is redirected to the 404 page. If you remove this "?controller=404" from the end of the url, the link works perfectly. I have enabled / disabled friendly URLS... i have deleted and regenerated my htaccess to try and resolve the problem - with no success. I have even used google webmaster tools to recrawl my website...generated a google sitemap in the prestashop admin area and uploaded it to webmaster tools...with no success. The problem is that the URL google has indexed is correct...but for some reason this is being added to the end. please help... this is a huge issue for me Edited October 22, 2013 by El Patron (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted October 21, 2013 Share Posted October 21, 2013 I have seen this problem on the forum...but without any 'real' resolution. can you attach your .htaccess file to this post please, click more reply options to attach Link to comment Share on other sites More sharing options...
mackster Posted October 21, 2013 Author Share Posted October 21, 2013 had to change it to a .txt file because it wouldnt allow me to upload the original. Ive tried everything ... its driving me insane this url problem htaccess.txt Link to comment Share on other sites More sharing options...
El Patron Posted October 21, 2013 Share Posted October 21, 2013 weird... can you try disable apache multivews, set to 'yes'. then clear browse cache and cookies and click form google link http://screencast.com/t/HHc4SnTP07rc what is odd is that google shows the correct url http://screencast.com/t/IjvZ2wXP65A which has this link: http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&ved=0CDgQFjAC&url=http%3A%2F%2Fmichaeljacksoncostumestore.com%2F9-shoes&ei=dbNlUrTcEMfB2wWojoCwBQ&usg=AFQjCNFw_4vIyFhNH45928Sxfg6pwsuhEA&sig2=aun-J6k8j34a3LoB-ggcjg so it makes me think that your shop is not able to build the correct link from this Link to comment Share on other sites More sharing options...
mackster Posted October 21, 2013 Author Share Posted October 21, 2013 I have disabled apache multiviews.. but still have the same problem. The shop does seem to be building the URLs correctly...because the url works perfectly if u remove the 404 comment at the end. if you look at the htaccess there is a conditional statement towards the end which redirects to a 404 if mod_rewrite isnt enabled.... but as we can see from the links being displayed and my htaccess file - mod_rewrite IS enabled... otherwise it wouldnt be generating the friendly URLS. This is one of the weirdest anomalies ive ever seen. Doesnt make sense... Link to comment Share on other sites More sharing options...
mackster Posted October 21, 2013 Author Share Posted October 21, 2013 #If rewrite mod isn't enabledErrorDocument 404 /index.php?controller=404 maybe this is along the lines of what we need to look into.... maybe the shop doesnt think mod_rewrite is enabled...and is 404-ing the friendly urls Link to comment Share on other sites More sharing options...
El Patron Posted October 21, 2013 Share Posted October 21, 2013 for a reason as yet unkown, and what it looks like to me is that ps is not handling the link passed by google, it seems to get confused after the category and then add's the 404 controller. re the link http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&ved=0CDgQFjAC&url=http%3A%2F%2Fmichaeljacksoncostumestore.com%2F9-shoes&ei=dbNlUrTcEMfB2wWojoCwBQ&usg=AFQjCNFw_4vIyFhNH45928Sxfg6pwsuhEA&sig2=aun-J6k8j34a3LoB-ggcjg try turning off automatically redirect to canonical url...and retest I check the ErrorDocument, even checked the code...it add's that to all .htaccess...you could add a # to disable it and test... you may need to open a forge report on this one...as it appears to be outside my pay grade, which is 0 Link to comment Share on other sites More sharing options...
mackster Posted October 21, 2013 Author Share Posted October 21, 2013 thanks my friend... ive tried what u suggested... but no luck. Is there a setting in prestashop to rebuild all urs or to check database for errors... im trying to think of anything that could be causing this Link to comment Share on other sites More sharing options...
mackster Posted October 21, 2013 Author Share Posted October 21, 2013 another weird thing... if i clicked google cached version of one of my search results... it works correctly and doesnt 404 Link to comment Share on other sites More sharing options...
El Patron Posted October 21, 2013 Share Posted October 21, 2013 I just want to cry..jajajaja... I check some of my url's out of google...they work of course...but they are no different really than your google urls... this a windows sever by any chance? off to watch tv with the boss.. personally, I'd open a forge bug report... http://forge.prestashop.com/secure/Dashboard.jspa I've always had good service from the ps team if I document my problem. Link to comment Share on other sites More sharing options...
El Patron Posted October 21, 2013 Share Posted October 21, 2013 another weird thing... if i clicked google cached version of one of my search results... it works correctly and doesnt 404 can you post the link of the cached link? we could then at least compare that to what is not working... Link to comment Share on other sites More sharing options...
mackster Posted October 21, 2013 Author Share Posted October 21, 2013 ive fixed it!! Link to comment Share on other sites More sharing options...
mackster Posted October 21, 2013 Author Share Posted October 21, 2013 basically...when i setup the shop... i must've entered the url as michaeljacksoncostumestore.com (without the www.) now... in the multishop menu...for some reason it was changed to www.michaeljacksoncostumestore.com... and last week i got a message on the backend of the shop advising me that my multishop url was different to my shop url under general settings... so i changed it to www.michaeljacksoncostumestore.com... as suggested so just now, i re-enabled multishop - removed the www. - saved and disabled multishop then i went back to general and changed the url to remove the www. and saved it ...and voila!! 1 Link to comment Share on other sites More sharing options...
mackster Posted October 22, 2013 Author Share Posted October 22, 2013 i also want to add... i never enabled multishop before i got the msg to say that the urls didnt match.... i think this may be the same problem everyone has had but not managed to solve. Link to comment Share on other sites More sharing options...
El Patron Posted October 22, 2013 Share Posted October 22, 2013 that's great you found it. I will mark as solved. Link to comment Share on other sites More sharing options...
viktor123 Posted October 23, 2013 Share Posted October 23, 2013 (edited) HI, as I see you remove the www from both multiview and then from general settings, In my case, the settings were without www and I noticed I had the ending controller=404 appendedd when clicking on links embeded in product descriptions. I changed the links from absolute to relative and things got better Just change from http://www.site.com/somepage.html to /somapage.html. Another thing I've noticed is that when domain is set to www.site.com in Preference->Seo and Urls, then your absolute links should look like http://www.site.com/somepage.html and vice versa. If the domain is just site.com, then absolute links should look like http://site.com/somepage.html. If there is mismatch, prestashop adds immediately controller=404, when the link is clicked. Edited October 27, 2013 by viktor123 (see edit history) 2 Link to comment Share on other sites More sharing options...
virtualunlock Posted May 29, 2015 Share Posted May 29, 2015 excuse my English I have the solution here. if your url created in WEB MASTER TOOL is ( www.misite.com) only need create a NEW but now ( misite.com ) WITH WWW AFTER CREATE NEW WITHOUT WWW I hope to help you BR Link to comment Share on other sites More sharing options...
Recommended Posts