【发布时间】:2014-12-09 06:34:42
【问题描述】:
这是我的 .htacess :
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
我想将非 www 请求重定向到 www.example.com 但是当我添加时
RewriteCond %{HTTP_HOST} !^www.example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
我的 css 和 js 以及其他文件现在出现 404 错误,所有文件请求都转到 yii 控制器
框架:yii2
PHP 5.4
阿帕奇:2.4.7
【问题讨论】: