Lakshmanan PHP Posted March 3, 2014 Share Posted March 3, 2014 I am getting 404 error on activating seo urls But no error in local host Mod rewrite enabled on server. Host : Digital Ocean version : 1.5.4 Server : Linux There is no significant entries regarding this error in error log Because of this I cant use web service Link to comment Share on other sites More sharing options...
NemoPS Posted March 3, 2014 Share Posted March 3, 2014 The only thing I can think about is mod_rewrite is somehow broken on the hosting. Have you tried getting in touch with the company? Link to comment Share on other sites More sharing options...
kalakrima Posted March 5, 2014 Share Posted March 5, 2014 (edited) Hi I just figured that I have 404 errors when mod_rewrite enabled. The domain name is www.mydomain.com, prestashop is installed in a subfolder called /shop/ Without URL rewriting If I access with or without www to my shop, it redirects me automaticly to http and everything works, but when the rewrite mode is enabled and If I follow a link with www.mywebsite.com/shop/fr/cat/262-product.html it redirects me to 404 : www.mywebsite.com/shop/fr/shop/category?controller=404, but if I disable the URL rewriting, then everything is fine. Do you know how can I fix this issue? Edited March 5, 2014 by kalakrima (see edit history) Link to comment Share on other sites More sharing options...
Lakshmanan PHP Posted March 7, 2014 Author Share Posted March 7, 2014 @kalakrima exactly the same issue. SEO urls working if the shop is in root folder Inside a sub folder /shop/store-name/ its not working - 404 errors occurred. Any solution for this issue? Link to comment Share on other sites More sharing options...
kalakrima Posted March 7, 2014 Share Posted March 7, 2014 @Lakshmanan PHP : yes weird issue. but I'm very surprised to see that the team didn't answer, because there many people with this problem. So : Firstly, I edited my DNS zone, in that way to point my site with or without www to the same IP address. (Type A) After 24 hours, when It was done, I saw that in my BO (when I check the permissions for employees) I have broken links to modules, (I don't know if it is in relation, but who knows). They was installed in my database, but not present in the folder. So I go to my phpmyadmin, and I look in ps_module, ps_module_group etc to find the modules and delete them. (If you have something like this, remember to mark the ID of the module in the table ps_module, because in the other tables, there will be only the ID ) I cleaned my cache/smarty/compile and cache/smarty/cache from the FTP. I cleaned browser cache, delete history and cookies. I restarted my browser. Then I disabled Friendly URL's. Wrote in the domain field => www.mydomain.com Path to the folder => /shop/ (basic) I checked if it works. Everything worked fine with or without www (if I go to mydomain.com/shop/ It redirects me to www.mydomain.com/shop) Then I enabled Friendly URL's and everything worked fine : shopping cart, authentification, registration. In the root folder I placed new .htaccess with a redirection from mydomain.com to www.mydomain.com Because all my links from google are with www. So now, I can use www.mydomain.com but if I follow a link like : http://mydomain.com/shop/category/product.html => I'm redirected to : www.mydomain.com/shop/category/product.html?controller=404 It finds the good URL but it not converting to this url. For me it's not a problem because all my links are with www I don't have links without www. But for the SEO it's a problem. You need to choose a favorite domain in Google Webmaster Tools. I choose www.mydomain.com instead of http://mydomain.com I've submitted a bug tracker issue, but the PrestaShop Team told me that this is not a bug but only a misconfiguration. They didn't answer even when I contacted the support. I (and my developers) declare that is definitely a bug with the htaccess and the dispatcher. Older versions of PrestaShop worked fine with or without www, there was a match between the http url's and www url's now it's just not happen. Hope this will help you a little. If you find a solution to have a match between http and www url's I'll be glad to hear it 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