0

我在我的.htaccess文件中有这个片段来防御任何试图进入应用程序目录的人。

RewriteCond %{REQUEST_URI} ^/app.*$
RewriteRule ^(.*[^/])/?$ index.php?r=$1 [L,QSA]

虽然它在我去的时候有效http://domain/app/,但如果我向 提出请求http://domain/app,它会重定向到http://domain/app/?r=app.

有谁知道需要改变什么来阻止这种重定向?

4

2 回答 2

1

尝试DirectorySlash可以在全局或每个目录中使用的指令。

http://httpd.apache.org/docs/2.2/mod/mod_dir.html#directoryslash

于 2013-01-01T20:26:05.043 回答
0

尝试使用

[L]

代替

[L,QSA]
于 2012-06-26T14:13:55.407 回答