php - Url manager rule preventing from entering into a module -
i using yii 1.1.14 , getting problem due url manager
in url manager (in main.php) have created rule
'<controller:\w+>/<action:\w+>/<bookingid:\w+>'=>'<controller>/<action>',
this rule prevent me entering admin module. whenever try enter admin module, shows page redirecting problem might because of soome redirection loop.
but whenever following things, can enter admin module:-
- if change
<bookingid:\w+>
<bookingid:\d+>
. changing w d - if change
'<controller:\w+>/<action:\w+>/<bookingid:\w+>'
'<controller:\w+>/<action:\w+>/<abc:\w+>/<bookingid:\w+>'
. adding 1 more parameter
but both of them change url this
controller/action?bookingid=adasasd
so wanna ask why rule affecting admin module. there wrong ?
you should specify second rule module:
'<module:(yourmodulename)>/<controller:\w+>/<action:\w+>/<bookingid:\w+>'=>'<module>/<controller>/<action>'
in rule can restrict bookingid
parameter integer values specifing \d+
rule (<bookingid:\d+>
) if variable can takes integer values.
Comments
Post a Comment