I would like to ask if it's possible to make magento ignore a string added to a product url. For example, I have a product url: http://mywebsite.lc/product-name

Is it possible that when entering: http://mywebsite.lc/product-name/some-string

magento can still understand and direct to: http://mywebsite.lc/product-name while keeping the string on the url?

I need the string part for some js functions, and also for a friendly URL.

Thanks you

  • Hi @Bao Doan welcome to Magento SE. Can you please explain more. Like what do you want to do? Nov 7, 2018 at 11:13

1 Answer 1


While your can write a controller and a module to ignore the last part of the item URL you'll also need to set a session variable and check that session variable in your desired js.

That's an Overkill.

A simpler approach would be to use


Then you can simply add js to check value of the custom url parameters

  • thanks for answering, yeah it can work like that. But there gonna be a param on the URL, which is not exactly user friendly
    – Baodoan
    Nov 8, 2018 at 1:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.