Jump to content

Prestashop 1.7. - Removed "content/" from URL - 404 error


Alin Marian

Recommended Posts

Hello,

I created some pages in the shop using the old format (eg: site.com/content/4-about-us).

I installed the pretty url module so that the ID is no longer visible and i removed the "content/" word from the url.

So now i have: site.com/about-us, but when i click on the page from the menu to view the content, it gives me a 404 error page.

What is wrong and how can i fix this?

Thanks

Link to comment
Share on other sites

41 minutes ago, juanrojas said:

hello, check the configuration of the module, maybe from there it will let you see the route, I say this because for example this module allows you to configure the cms route within the module

My module doesn't have that option. It just removes the IDs from URL.

But thanks for recommending the plugin.

Link to comment
Share on other sites

  • 1 year later...

Hello, 

I'm having the same problem. How can I remove “content/20” from my CMS page https://mysite/content/20-black-friday. In this case the “20” is the ID of the CMS page. 

When i try to change page routing from SEO & URLs, it gives me this:The keyword “{id}" is required for the “cms_rule” route (rule: “{rewrite}"). The keyword “{id_product_attribute}" is required for the “old_product_rule” route (rule: “{category:/}{id}-{rewrite}{-:ean13}").

If i try to regenerate .htaccess by disabling than save and after that enabling save and again the friendly URLs i get: The keyword “{id_product_attribute}" is required for the “old_product_rule” route (rule: “{category:/}{id}-{rewrite}{-:ean13}").

Is there any way to change the link to a friendly URL like to  https://mysite/black-friday?

Link to comment
Share on other sites

  • 8 months later...
On 10/19/2023 at 3:02 PM, mk2-pronat said:

Hello, 

I'm having the same problem. How can I remove “content/20” from my CMS page https://mysite/content/20-black-friday. In this case the “20” is the ID of the CMS page. 

When i try to change page routing from SEO & URLs, it gives me this:The keyword “{id}" is required for the “cms_rule” route (rule: “{rewrite}"). The keyword “{id_product_attribute}" is required for the “old_product_rule” route (rule: “{category:/}{id}-{rewrite}{-:ean13}").

If i try to regenerate .htaccess by disabling than save and after that enabling save and again the friendly URLs i get: The keyword “{id_product_attribute}" is required for the “old_product_rule” route (rule: “{category:/}{id}-{rewrite}{-:ean13}").

Is there any way to change the link to a friendly URL like to  https://mysite/black-friday?

Hi, 

you can change the route from "content/{id}-{rewrite}" to "content/{rewrite}", and you would get rid of the ID ("20-"). 

We are using an additional Module Pretty URLs, and I asked them some time ago, if it's possible to allow only "{rewrite}" (so something like "/about-us" is possible), but they responded that it is not. The only thing you can do, is change "content" to something else. 

Good luck! 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...