Magento Forum

Problem with my router to rewrite URL
 
polis4r
Jr. Member
 
Total Posts:  4
Joined:  2012-11-19
 

Hi everyone,

I I’m trying to catch my url controller with my router to redirect from another one.
I wanna redict my wishlist from this one : wishlist-id.html

I’ve made modifications in my differents flles but it doesn’t work with my wishlist frontname. If I’m trying with another one, for example cms, everything works perfectly.

I put my xml and my router below.
Thanks for you help smile

P.

Config.xml

<events>
    <
controller_front_init_routers>
        <
observers>
            <
wishlist>
                <class>
BBT_Wishlist_Controller_Router</class>
                <
method>initControllerRouters</method>
            </
wishlist>
        </
observers>
    </
controller_front_init_routers>
</
events>

Router.php

class BBT_Wishlist_Controller_Router extends Mage_Core_Controller_Varien_Router_Abstract {

    
public function initControllerRouters$observer )
    
{
        $front 
$observer->getEvent()->getFront();
        
$front->addRouter('wishlist'$this);
    
}

    
public function match(Zend_Controller_Request_Http $request)
    
{
        var_dump
('match'); die();
    
}
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top