【发布时间】:2017-12-10 10:33:07
【问题描述】:
我有这个.htaccess
DirectorySlash On
RewriteEngine On
RewriteRule /?\.htaccess$ - [F,L]
# Remove trailing slash
RewriteRule ^(.*)/$ /project/$1 [R,L]
# Map every link to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/project/index.php.*$
RewriteRule ^(.*)$ /project/index.php?___MYROUTER=$1 [QSA,END]
但是当我导航到我的.htaccess 文件旁边的目录之一时,例如浏览器中的css 文件夹,地址如下:
那么我的地址将更改为:
在 Firefox 中,结果如下:
页面未正确重定向
Firefox 检测到服务器正在重定向请求 这个地址永远不会完成。
This problem can sometimes be caused by disabling or refusing to accept cookies.
但其他不指向现有目录的地址也可以,例如:
这个地址没问题,不会改成其他的
我的.htaccess 有什么问题?
这是我的log 文件
【问题讨论】:
标签: apache .htaccess web server wamp