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:-

  1. if change <bookingid:\w+> <bookingid:\d+> . changing w d
  2. 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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -