Answer the question
In order to leave comments, you need to log in
How do I give 404 for existing links?
A request of the form /?r=blabla
or any similar one /?mod=blabla
opens a page from 'defaultRoute' => 'site/default/index',
And I want it to give out 404.
How to do this?
Here is my wheel
'enablePrettyUrl' => true,
'enableStrictParsing' => false,
'showScriptName' => false,
'rules' => [
'<_m:[\w\-]+>/<_c:[\w\-]+>/<_a:[\w\-]+>' => '<_m>/<_c>/<_a>',
],
'errorHandler' => [
'errorAction' => 'site/default/error',
],
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question