E
E
EVOSandru62016-02-23 06:38:58
Yii
EVOSandru6, 2016-02-23 06:38:58

How to remake url parser in Yii1?

Good afternoon, there is a problem:
With this scheme in the Url manager:

'<tenant:\d+>/'                                         => 'hotels/index',
        '<tenant:\d+>/<action:(login|logout|registration)>'     =>  'users/<action>',
        '<tenant:\d+>/<action:(contact)>'                       =>  'site/<action>',
        '<tenant:\d+>/<controller:\w+>/<id:\d+>'                =>  '<controller>/view',
        '<tenant:\d+>/<controller:\w+>/<action:\w+>/<id:\d+>'   =>  '<controller>/<action>',
        '<tenant:\d+>/<controller:\w+>/<action:\w+>'            =>  '<controller>/<action>',
        '<module:\w+>/<controller:\w+>/<action:\w+>/<id:\d+>'   =>  '<module>/<controller>/<action>/<id>',
        '<module:\w+>/<controller:\w+>/<action:\w+>'            =>  '<module>/<controller>/<action>',

How to make it so that, for example, being on the page at the address:
domen/tenant/1/controller/87
Parser of controllers , actions correctly parse lines with '<tenant:\d+>/'and discard this element. But at the same time I didn’t delete it, because. it needs access.
Otherwise, I constantly fall on the default action of the default controller with all reference transitions.
Where to dig?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question