Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
'urlManager'=>[
'class' => 'yii\web\UrlManager', //指定實現類
'enablePrettyUrl' => true, // 開啓URL美化
'showScriptName' => false, // 是否顯示index.php
'suffix' => '.html', // 僞靜態後綴
'rules'=>[
// 自定義路由規則
],
],