I want to create a module for which I would like 2 frontName is it possible. if yes how can I do it ?
1. example.com/a/index/test 2. example.com/b/index/test both pointing to app/code/Vendor/Test/Controller/Index/Test.php
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
Define two routes in routes.xml
<route frontName="name1" id="name1"> <module name="Vendor_Module"/> </route> <route frontName="name2" id="name2"> <module name="Vendor_Module"/> </route>
Create different layout file for router
For NAME1:view/frontend/layout/name1_index_index.xml For NAME2:view/frontend/layout/name2_index_index.xml