Seo & urls - schema of urls


Under preferences > seo & urls you can improve the presence of your PrestaShop site on web searches, and therefore reach more potential customers. Here you can also manage some important settings related to urls like enable / disable friendly urls. define the structure of urls etc. Below you can read informations about seo & urls settings in context of pretty clean urls module.

Schema of urls in prestashop

 

Settings of the seo & urls in context of Pretty Clean urls module
To manage seo settings in your shop you have to go to preferences > seo & urls section. There you can improve some seo things related to the shop. Some of these settings are very important for clean urls addon.

 

Set up URLs
The main option in context of plugin you bought is Friendly URL. This optin must be enabled - only then pretty clean urls will work properly. It's obvious but it is worth to mention that :)
friendly urls prestashop

You may see a message such as "URL rewriting (mod_rewrite) is not active on your server or it is not possible to check your server configuration. If you want to use Friendly URLs you must activate this mod". In this case, PrestaShop cannot detect your server settings, but that does not mean the feature will not work. You must test it yourself.

 

Schema of URLs

This section enables you to change the default pattern of your links. In order to use this functionality, PrestaShop's "Friendly URL" option must be enabled (descibed it above), and Apache's URL rewriting module (mod_rewrite) must be activated on your web server (usually it is. Hosting accounts that have php usually has this option so dont worry about that). You can change the way friendly URLs are generated, by changing the route to a resource on your shop. In this section you can define the structure of each type of address in your shop. So, you can manage here the structure of category links, product links, cms links, etc. To make these settings friendly for pretty clean urls module you must remove {id} from routes. Below you can find list of routes that are necessary for this module.

After installation of the module this section should be automatically changed. If not - this means that you will have to alter the routes manually. So If routes still contain the {id} just fill out routes like i show below (proper values inside modified value columns):
Route Default value Modified value
Route to product {category:/}{id}-{rewrite}{-:ean13}.html

{category:/}{rewrite}.html
alternatives:
{rewrite}.html
{categories}{rewrite}.html
{categories}{rewrite}

Route to category {id}-{rewrite} {parent_categories:/}{rewrite}/
alternatives:
{rewrite}/
Route to supplier {id}__{rewrite} supplier/{rewrite}/
alternatives:
any-text/{rewrite}/
Route to manufacturer {id}_{rewrite}

manufacturer/{rewrite}/
alternatives:
any-text/{rewrite}/

Route to CMS page content/{id}-{rewrite} info/{rewrite}.html
Route to CMS category page content/category/{id}-{rewrite} info/{rewrite}

 

Multistore environment

If you run shops with multistore environment there is a chance that you will have to alter schema of urls for each shop available in your back office. Please verify settings of "schema of urls" for each available shop - while you will edit "schema of urls" just select shop that you want to configure from shop-context menu.

 

Possible problem with saving routes - explanation

Sometimes it is possible that right after you will try to save the new modified routes - prestashop will spawn errors about "keyword {id} is requires for route (...)". See image bellow where I attached screenshot of this message.

keyword id required for route

This problem is caused to fact that overrides (a part of the module) were not installed, or your shop works without overrides (overrides are disabled). Because of this you firstly need to check this topic of module documentation: disabled overrides - module does not work.