How to add an SEO friendly URL for any controller in PrestaShop?

Page 1

How to add an SEO friendly URL for any controller in PrestaShop?

With the introduction of the friendly URL and customized URL, PrestaShop revolutionized the control of URLs in its update PrestaShop v1.5. Later in the PrestaShop v1.5.3, it added the feature of URL dispatcher to enhance the URL rewriting in PrestaShop. With this update, PrestaShop made the URL rewriting or URL customization for modules very easy. An SEO URL structure is a special customized URL which simplifies the complex structure of the URL to a very simple and easy to understand structure. For example : Say you have new module called “yourmodule”. Let say it has two main functions. 1. Page list of commands for any user 2. Using “yourmodule” to see the order details. Now if the friendly URL is Disabled, you will see your page list URL something like this: http://www.yourrstore.com/index.php?fc=module&module=monfmodule&controller=orders&module_ action=listing If Friendly URL is enabled you will see the same page list with this URL: http://www.yourrstore.com/module/monmodule/orders?module_action=listing As we can see that the second case presents the more simplified and understandable URL structure and this is because of the Friendly URL being active on your site. Friendly URLs are nice to have on your site. A clean, SEO friendly URL is more understandable and easily readable by the search engines. Adopting a friendly URL is one of the pre-development SEO


approaches.

How to get the Friendly URL for your front controller pages? Follow these simple steps to get an SEO Friendly URL for your module controller: Step 1: Login to your Back office.

Step 2: Navigate to Preferences>>SEO & URLs


Step 3: You will see the configuration page “SEO & URLs”.You will see the list of front pages, Page Title, and their URL. Something like the below screen shot:

Step 4: Now, click on "Add new Page" as shown in the screenshot below:


Your will be redirected to a page which looks something like below:

Step 5: Clicking on the tab "Page" will open a drop down list of all the pages that are created on your website. Select the page from the list for which you want to rewrite the URL.

Step 6: Enter the details asked in the form above and also mention your custom URL in the “Rewritten URL” tab. Click “Save” to store your settings. After saving the form, the task of rewriting the URL is done here. But is some cases you will need to perform the following additional operations. 1. Clear the cache: Sometimes cache won't let the new URL show on the front end. To avoid this you need to go to Advance Parameter>>Performance

and clear the cache from there.

2. Make sure in Preferences >> SEO & URLs >> SET UP URLS, the “Friendly URL is turned on”. You can also disable the “Accented URL"; it's optional. So, here we learned how we can rewrite the URL of any front page on our PrestaShop site. The support for Friendly URLs is really a nice feature in PrestaShop which also acts as a competitive advantage against other CMS systems.


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.