Ben mod-rewrite yönlendirici kullanıyorum.
I am trying to add a Route to the router that will convert the following url:
baseurl/category/aaa/mycontroller/myaction/param/value
to be:
Controller=mycontroller
action=myaction
- Parametreler -
category=aaa
param=value
Benim bootstrap de aşağıdaki (çalışmıyor) kullanıyorum, _Front frontController olduğunu
$Router=$this->_front->getRouter();
$CategoryRoute = new Zend_Controller_Router_Route('category/:category/:controller/:action/*');
$Router->addRoute('category', $CategoryRoute);
The error I get is a thrown router exception when I am using the Zend_View::url() helper (with or without giving it the name of the new route).
The exception is thrown only when I have baseurl/category/....
Ne eksik?
What I missed:
Since there was [category] in the url, The router that was used is the one defined above.
When I used the url() helper, I didn't give any value in it to the [category] hence there was no value for this key in the url parts->failure.
Giving a default, makes it work.