.htaccess Yii2+;htaccess&x2B;wamp未找到404
请帮忙,我已经读了很多关于这个问题的帖子,没有任何帮助 我在:c:/sites/mysite下安装了yii2 index.php文件位于:c:/sites/mysite/web中 我在c:/sites/mysite下有一个htaccess文件,如下所示: #打开重写引擎 重新启动发动机 重写基/ 重写规则^index.html?$home.php[NC,R,L] DirectoryIndex home.php.htaccess Yii2+;htaccess&x2B;wamp未找到404,.htaccess,yii2,wamp,virtualhost,.htaccess,Yii2,Wamp,Virtualhost,请帮忙,我已经读了很多关于这个问题的帖子,没有任何帮助 我在:c:/sites/mysite下安装了yii2 index.php文件位于:c:/sites/mysite/web中 我在c:/sites/mysite下有一个htaccess文件,如下所示: #打开重写引擎 重新启动发动机 重写基/ 重写规则^index.html?$home.php[NC,R,L] DirectoryIndex home.php # on what should it skip the rules RewriteR
# on what should it skip the rules
RewriteRule ^(favicon.ico) - [L]
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Do not allow calls from servers testing ou server fi were a proxy
# http://serverfault.com/questions/499125/banning-all-azenv-php-request-to-my-server
#RewriteCond %{HTTP_REFERER} .*/azenv\.php [NC,OR]
#RewriteRule .* - [F]
#RewriteCond %{HTTP:X-Forwarded-Proto} !https
#RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI}
# otherwise forward it to index.php
RewriteRule . index.php
我的vhosts文件包含以下代码:
服务器名管理器
服务器别名armanager
DocumentRoot“c:/sites/armanager/web”
选项索引跟随符号链接
选项索引跟随符号链接
允许超越所有
要求所有授权
在firefox上访问mysite效果很好
我有一个带有actionSettings功能的控制器。
我有一个视图settings.php
转到mysite/es/settings会给我一个可怕的404notfound错误
您能帮忙吗?好的,我在web文件夹中添加了这个.htaccess:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
</IfModule>
重新启动发动机
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则。index.php
现在,一切正常。虚拟主机代码复制不正确:ServerName armanager ServerAlias armanager DocumentRoot“c:/sites/armanager/web”选项索引后面的Symlinks选项索引后面的Symlinks AllowOverride all需要授予所有权限