1

I'm building a Magento 2.2 store and would like to remove all customer pages like login, account, register, etc.

I noticed that I can remove all customer routes (customer/ * / *) when I remove the /vendor/magento/module-customer/etc/frontend/routes.xml file but of course that's not a neat way, do you guys have an idea on how this could be achieved in a neat way?

Thanks!

  • you can create observer and redirect all this route in specific page like home page so user are not able to access that. – Yogesh Oct 31 '17 at 13:06
2

I ended up using the controller_action_predispatch observer and made a list of routes that other users can't access, if the requested route is found in my list, the user gets redirected to the not found page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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