In web.phpI have the following code:
'urlManager' => [
'class' => 'yii\web\UrlManager',
'showScriptName' => false,
'enablePrettyUrl' => true,
'rules' => array(
'calc' => 'site/calc',
),
],
And I want to allow users access to example.com/calc, but not to example.com/site/calc. How can I do this with less effort? In other words, now both options work " site/calc" and " calc", and I want to disable " site/calc".
source
share