0
我在訪問高級主題的後端部分時遇到問題。基本上我無法訪問前端部分的.htaccess中進行更改。 在根文件夾中的.htaccess是:Yii2高級主題後端訪問
RewriteOptions inherit
Options -Indexes
RewriteEngine on
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_URI} !^/frontend/web/(assets|css|stylesheets|images|js)/
RewriteCond %{REQUEST_URI} !admin
RewriteRule .* frontend/web/index.php [L]
</IfModule>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
您還需要在.htaccess中配置後端規則。查看http://stackoverflow.com/questions/28118691/yii2-htaccess-how-to-hide-frontend-web-and-backend-web-completely –