V1.7 How to Completely Remove Numeric ID from CMS Page URLs in PrestaShop 1.7

adamdeee

New member
XNullUser
Joined
Jul 22, 2025
Messages
1
Reaction score
0
Points
1
Location
Poland
NullCash
8
Hi everyone,


I’m using PrestaShop 1.7 and I need to clean up my CMS page URLs so they no longer include the numeric ID prefix. Right now, even after changing the “Route to CMS pages” in Shop Parameters → Traffic & SEO from


bash
KopiujEdytuj
content/{id}-{rewrite}


to


bash
KopiujEdytuj
{id}-{rewrite}


I still end up with URLs like:


arduino
KopiujEdytuj


I’ve also set the Friendly URL slug (Link rewrite) to stores, and regenerated .htaccess + cleared cache, but the ID (here: “6”) stubbornly remains.




What I’ve tried so far​


  1. Disabled multistore (I no longer need it).
  2. Edited Shop Parameters → Traffic & SEO routing to {rewrite} and {id}-{rewrite}.
  3. Cleared cache & rebuilt .htaccess by toggling Friendly URLs off/on.
  4. Checked that my CMS page’s Meta title, Meta keywords and Link rewrite are set correctly to stores.

Unfortunately, PrestaShop’s back‑office forces the {id} placeholder in the routing pattern whenever you edit through the UI.




What I’m looking for​


  • A code‑based solution (module or override) that hooks into PrestaShop’s routing and defines a new cms_page rule without the id parameter.
  • Ideally something that works via hookModuleRoutes (PS 1.7) or a minimal override of the Link/Symfony routing.
  • Example snippets or a small “dummy” module would be greatly appreciated.

Thanks in advance for any guidance or code samples!
 
Top