Is it possible to remove module name through htaccess or any other way around to hide module name from url of magento 2 .i.e http://abcd.com/modulename/controller

Only need to display controller name instead of the module name.

1 Answer 1


You can add a URL Rewrite.

Go to Marketing/SEO & Search/URL Rewrites

Then create a new rewrite, put in correct request path, which should be the path to your desired new path, and target path should be the path to your module's controller /modulename/controller


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.