Answer the question
In order to leave comments, you need to log in
How to remove controller name from url in Yii?
Hello, there is a standard site controller, how to remove it from the path using urlManager or htaccess. Well, it is desirable so that the site/programs/program1 type record does not fly off. Thank you!
Answer the question
In order to leave comments, you need to log in
For yii2
.htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
....
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'suffix'=>'/',
'rules'=>array(
''=>'site/index',
'<action>'=>'site/<action>',
),
],
...
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'<action:\w+>'=>'<controller>/<action>',
),
),
padding there. from .benefit most likely
.benefit{
width: 100%;
background: #fff;
padding: 54px 0; //этот
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question