PrestaShop 1.6.x. How to regenerate .htaccess file

[notice type=”warning”]Note! .htaccess is a special configuration file which is used on web servers running on the Apache web server software. It is located in your store root directory and enables some environment variables. Without .htaccess it will not be possible to turn on the URLs (URL – rewriting rules etc.), disable access to some directories, actions, etc.

Why is Regenerating .htaccess File required?

Sometimes it is necessary to regenerate .htaccess file. Some features may not work properly in your PrestaShop front office, after some changes in SEO & URL’s settings, after adding image types into Preferences -> Images section, after activating and modifying the multistore. In this case, you must regenerate .htaccess file.

Removing File from Your Root Directory
  1. Enter your website server via FTP or cPanel File manager.
  2. Go to your store root directory.
  3. Download .htaccess file to your computer to back it up.
  4. Choose the file on your server and click Delete button.
Regenerate Using SEO URLs
  1. Log into your PrestaShop admin panel.
  2. Go to Preferences -> SEO and URLs section: 
  3. Set Friendly URL option to No and click Save button:
  4. Enable Friendly URL back and save the changes.
  5. .htaccess will be regenerated in your store.
Regenerate If You are Using Multistore
  1. Log into your PrestaShop admin panel.
  2. Go to Preferences -> General section: 
  3. Turn the multistore feature off and save changes.
  4. Enable Multistore back and save the configuration.
  5. Your .htaccess file will be regenerated properly.

Hopefully, this tutorial was helpful for you.