Yii2启用Pretty URL后返回404错误求助
我已经搭建过好几个Yii项目了,从来没碰到过这类问题。目前我用的是Yii的基础模板,我的Apache虚拟主机配置如下:
<VirtualHost *:80> ServerName shop DocumentRoot "C:/xampp/htdocs/shop/web" <Directory "C:/xampp/htdocs/shop/web"> RewriteEngine on # 若目录或文件存在,直接使用请求 RewriteCond %{REQUEST_FILENAME}!-f RewriteCond %{REQUEST_FILENAME}!-d # 否则将请求转发至index.php RewriteRule . index.php # 若UrlManager中$showScriptName设为false,请勿... </Directory> </VirtualHost>
内容的提问来源于stack exchange,提问作者Kyle
相关产品推荐
相关产品推荐

