Sometimes we need to generate or regenerate Prestashop htaccess for different reasons. For example, suppose you enable SSL on Prestashop, change the SEO & URLs settings, and regenerate the Prestashop htaccess file. Otherwise, your site may face a 404 error in Prestashop. If something is wrong with Prestashop default htaccess, your site or theme will not work correctly, and you will get the error. Some features will not work like product images will not display. In that case, we have to regenerate the Prestashop .htaccess.

Prestashop htaccess file is a special configuration file that is usually used on web servers that are running on the Apache webserver software. This htaccess file is located on the store root directory and it enables some environment variables. If we use “dot” before the htaccess like “.htaccess” then it means hidden file in Unix-based environments.

Where is the Location of Prestashop htaccess?

Prestashop htaccess file located on your FTP or Cpanel.

At first, you have to access your Cpanel or FTP.

Go to your website root directory file.

Then you will get the file name .htaccess.

So the Location is: your_store_file > .htaccess

Prestashop Regenerate htaccess

Before regenerating the Prestashop .htaccess, you have to back up this .htaccess file in your storage. If somehow you miss something or something wrong with your .htaccess file then you will get an error. So it is the best practice to keep the backup file if you are going to change something in your back office.

Backup and Remove the .htaccess file from Server

  • Go to your website server
  • Go to your store root directory
  • Find the “.htaccess” file
  • Download the “.htaccess” file for keeping backup.
  • Delete the .htaccess file from right-click button.

Prestashop htaccess Regenerate

We will regenerate .htaccess from the back office by following steps.

  • Log into your Prestashop back office.
  • Go to Configure > Shop Paramters > Traffic & SEO
  • Now find out the Set up URLs > Friendly URL
  • Set “Friendly URL” No and click on the Save button.
  • Set “Friendly URL” Yes and click on the save button.

Now “.htaccess” regenerated successfully on your server.

Prestashop “.htaccess” file in Multistore

If you have a multi-store in Prestashop then you also can easily regenerate Prestashop .htaccess file by following steps.

  • Login to the back office.
  • Go to Configure > Shop Paramters > General
  • Turn off the Multistore in “Enable Multistore” and click on save button.
  • Now turn on the Multistore back and click on save button.

Now “.htaccess” regenerated successfully in Multistore.

error: Content is protected !!