How to enable search engine friendly URLs in PrestaShop

By default, SEF (search engine friendly) URLs are disabled in PrestaShop. However, you can enable them very quickly by configuring a couple of settings in the admin panel of your PrestaShop store. There are slight differences depending on the PrestaShop version that you use.

If you use a version older than PrestaShop 1.5, such as PrestaShop 1.4 for example, after you log in to the backend of your store, click on the Preferences tab and then from the submenus that appear under the tabs click on SEO & URLs. Scroll down the page to the Set up URLs section, find the option labeled Friendly URL and mark the Yes button. Next, click on the Tools tab (it's right next to the Preferences tab), and then on the Generators submenu. In the section labeled .htaccess file generation mark the checkbox for Friendly URL and click on the Generate .htaccess file button. This will automatically generate an .htaccess file with the necessary rules in it.

If you use PrestaShop 1.5 or a newer version, there's a single option for enabling friendly URLs. Once it's enabled you don't have to specifically generate an .htaccess file as it's done in earlier versions. There's no such option. Just go to Preferences menu>SEO & URLs sub-menu, set the option Friendly URL to Yes and click on the Save button. The .htaccess file will be automatically generated.

However, if you have generated an .htaccess file before, this will overwrite the old file, potentially losing any other rules in it. If you have manually inserted some rules in the old .htaccess file, to keep them you can download the old file to your local computer, generate the new one from the admin panel with friendly URLs enabled, and then copy the rules from the old .htaccess file to the new one, which should be inside the root PrestaShop directory on your account. Of course, this should only concern you if there's already an .htaccess file in your PrestaShop directory, and if you have put any additional rules in it.

Was this answer helpful?

 Print this Article

Also Read