Question

I'd created a module and the url for the same is something like:

http://magento.korenpub.com/designer/index/index/id/26/value/Joseph%20B.%20Soloveitchik

but I need to rewrite the url to

http://magento.korenpub.com/author/id/26/value/Joseph%20B.%20Soloveitchik

How can it be done with config.xml? I'd read this blog which describes such, but I'm unable to do it for my module.

Code from config.xml

<global>
    <rewrite>
        <designer_url>
            <from><![CDATA[#^/author/id/$#]]></from>
            <to><![CDATA[/designer/index/index/id/$1]]></to>
            <complete>1</complete>
        </designer_url>
    </rewrite>
</global>
Was it helpful?

Solution

I'd been thinking it in more complicated way but its so simple

<global>
    <rewrite>
        <designer_url>
            <from><![CDATA[#^/author/id/#]]></from>
            <to><![CDATA[/designer/index/index/id/]]></to>
            <complete>1</complete>
        </designer_url>
    </rewrite>
</global>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top