I am currently looking at trying to generate custom urls/routing using magento, currently I have set a default route in config.xml within the local module.
<frontend>
<routers>
<portfolios>
<use>standard</use>
<args>
<module>Custom_Portfolios</module>
<frontName>portfolios</frontName>
</args>
</portfolios>
</routers>
<default>
<router>portfolios</router>
</default>
</frontend>
This currently works with the url path of /portfolios/index/action/custom-string which is the magento default route.
What I am trying to achieve is to have /portfolios/custom-string.html I have attempted to use a mod_rewrite rule with no success, I have found some references in relation to utilising a custom suffix of .html which I have added to the same config.xml file.
<default><portfolios><seo><portfolios_url_suffix>.html</portfolios_url_suffix></seo></portfolios></default>
I have looked at the alan storm docs in relation to routing and found it relevent to the default routing paths only or the information is a little out-dated.
Do you know the best method to control the routing within magento with possibly an easy to follow and relevent tutorial? if so please share :D many
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…