Questions tagged [routing]
Denotes questions related to the routing mechanism of Magento
130 questions
1 vote
1 answer
142 views
Route to Existing Layout
I am working on a custom page module and want to make a custom route however I would like to use the catalog_category_view.xml layout, instead of the [module_name]_index_index.xml needed for my route ...
0 votes
4 answers
688 views
Why is my post controller returning a 404?
I've created and enabled a module at app/code/Post/Test: app/code/Post/Test/registration.php: <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\...
0 votes
1 answer
362 views
Homepage routing problem with $this->pathConfig->getDefaultPath()
I'm currently running a Multistore Magento 2 site, I have 4 websites configured, 2 of which have multiple URL's to access the site. As a case example I have: domain-a.com www.domain-a.com domain-a.co....
0 votes
1 answer
2k views
Magento 2: How to use redirect in Router.php
I am trying to redirect a cms page to a custom controller. in router.php I can check the current URL, If the current URL is as an example if it matches /test-url i want to do a redirect to /test-url-...
1 vote
0 answers
224 views
Magento 2 custom routing frontend not working (100 router match iterations)
I have used this url to change it but i am keeping getting the same erros https://magento.stackexchange.com/a/209478/96152 i have a custom routes.xml <?xml version="1.0"?> <config ...
0 votes
1 answer
223 views
Magento 2 - all custom routing suddenly broken
I have a local Magento 2 site, not much changed recently. But all of a sudden, all custom routing, no matter what module it is from, is broken. In admin and frontend, I get 404s (from Magento, not a ...
0 votes
1 answer
693 views
Custom Controller goes to 404 in Magento 2?
I have created a custom controller and die on controller execute page but it goes to 404 ? COntroller file ( path : app/code/Mageplaza/HelloWorld/Controller/Index/helloworld.php ) <?php namespace ...
2 votes
1 answer
546 views
Can you redirect CMS page to custom frontend route magento 2.3.5
I am trying to redirect a cms page to a new route which I have created for frontend. I am not sure if we can redirect to the new custom module route frontend with a config in admin area. My aim is I ...