yii2 隐藏index.php
1.开启apache-rewrite 模块 httpd-conf 中配置
2.web.php 配置
‘urlManager‘ => [
‘enablePrettyUrl‘ => true,
‘showScriptName‘ => false,
‘rules‘=>[
‘<controller:\w+>/<action:\w+>‘=>‘<controller>/<action>‘,
],
],
2021-08-07 00:25:00
1.开启apache-rewrite 模块 httpd-conf 中配置
2.web.php 配置
‘urlManager‘ => [
‘enablePrettyUrl‘ => true,
‘showScriptName‘ => false,
‘rules‘=>[
‘<controller:\w+>/<action:\w+>‘=>‘<controller>/<action>‘,
],
],