Your routes on Magento 2.
composer require monsieurbiz/mbiz_router=dev-master
- URL:
http://example.org/foo.html
- Match:
http://example.org/foo/index/index
config.xml
:
<default>
<mbiz_router>
<my_router>
<type>static</type>
<route>foo.html</route>
<module>foo</module>
<controller>index</controller>
<action>index</action>
</my_router>
</mbiz_router>
</default>
- URL:
http://example.org/foo.hmtl
- Match:
http://example.org/foo/index/index
config.xml
:
<default>
<mbiz_router>
<my_router>
<type>regex</type>
<route>helloworld/(foo|bar|baz)\.html</route>
<reverse>helloworld/%1$s.html</reverse>
<map>
<key>1</key>
</map>
<module>hello</module>
<controller>index</controller>
<action>index</action>
</my_router>
</mbiz_router>
</default>
Please enjoy creating Pull Requests.
This source code is provided under MIT License.
Originally created by @jacquesbh, we made it for Magento 2.
Also, please find all contributors in the dedicated page.
On the road again