Magento Themes and Magento Extensions

How to create a custom router in Magento?

Share

How to create a custom router in Magento?

If you want to create a router for your own modules, perform the following steps.

1. open /app/etc/local.xml
2. Insert the following source code between config tag

01 <frontend>
02 <routers>
03 <$name>
04 <use>standard</use>
05 <args>
06 <module>$module_name</module>
07 <frontName>$router</frontName>
08 </args>
09 </$name>
10 </routers>
11
12 </frontend>

$name = name of your router.
$module_name = name of your module where your router redirects. For example, Moon_Products.
$router = router name.

Comments are closed.