Answer the question
In order to leave comments, you need to log in
How to write a rule in urlManager that the url attribute can be anything except the word 'test'?
How to write a rule in urlManager that the url attribute can be anything except the word 'test'?
As I understand it, this is how a regular expression is written. Don't tell me how? '<url:\w+>' => 'page/view'
Answer the question
In order to leave comments, you need to log in
In this case, you don't need to touch urlManager.
If there is no corresponding controller - and so it will be Not found.
If there is a controller, but you want limited access, then inside it check the necessary conditions and if something is wrong,throw new HttpException(404)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question