Jump to content

Friendly-urls 404


Recommended Posts

Dear Community,

 

When I turn on friendly-urls and after that generate a new .htaccess, I get the following error: "error occurred: 404 - not found" on all pages except for the homepage.

 

This error occurred after I moved the prestashop folder to the root of the server. Before it was installed in the subdirectory /shop/ and friendly-urls were working fine.

 

What I've tried:

- changing the settings.inc.php

- fresh reinstall prestashop and later importing the back-upped database

- delete the .htaccess and let prestashop generate a new one

- I can't seem to access the Apache httpd.conf file, but I suppose it should be fine since friendly-urls do work when I move the folder back to the subdirectory /shop/

- cleared cache and tested it on several computers

- checking disabling apache multiview before generating a new .htaccess file

 

 

I have already spent many hours trying to figure out what is causing this error and finding a way to solve this. I would be very happy if someone could lend me a hand with this one.

 

Ps. Attached is the prestashop generated .htaccess file for my website and please message me if you need further information.

.htaccess.zip

Link to comment
Share on other sites

Have you edited the __PS_BASE_URI__ constant in /config/settings.inc.php after moving from the subdirectory to the root directory? If you have your shop in the root directory the define for the constant should look like this:

 

define('__PS_BASE_URI__', '/');

 

You should also check the PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL in the `ps_configuration` table so they don't include your /shop subdirectory.

 

Another thing I've noticed is that the web browser sometimes caches more stuff than you think, if you try another web browser (which you haven't visited the site on yet), does it work? I've installed a plugin called DNS flusher for Firefox which saved me alot of time when changing htaccess files and different redirect rules.

Link to comment
Share on other sites

Thank you for your help Bazze! I have just tried what you suggested and also tested it with Firefox + DNS flusher. Unfortunately the problem remains :(

 

I have searched for "/shop" in the database, but didn't get any important results.

Also, currently the French language is the only enabled language. When I enable English as the second language the homepage URL gets automatically changed to tabletable.fr/fr/ This results in a 404 page for the homepage as well.

 

Do you perhaps have any other ideas?

Link to comment
Share on other sites

Thank you for your help Bazze! I have just tried what you suggested and also tested it with Firefox + DNS flusher. Unfortunately the problem remains :(

 

I have searched for "/shop" in the database, but didn't get any important results.

Also, currently the French language is the only enabled language. When I enable English as the second language the homepage URL gets automatically changed to tabletable.fr/fr/ This results in a 404 page for the homepage as well.

 

Do you perhaps have any other ideas?

 

This seems very strange. It should work. If you add more than 2 languages though, remeber to regenerate the .htaccess file.

 

I'm sorry, but I don't know what else to do. I've moved several PrestaShop installation from a subdirectory to root, and all I had to do was to change in the settings.inc.php file and check in the configurations table and regenerate the .htaccess of course.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...