Reputation: 4293
I have this snippet in my .htaccess
file to defend against anyone trying to get into the app directory.
RewriteCond %{REQUEST_URI} ^/app.*$
RewriteRule ^(.*[^/])/?$ index.php?r=$1 [L,QSA]
And although it works when I go to http://domain/app/
, if I make a request to http://domain/app
, it redirects to http://domain/app/?r=app
.
Does anyone know what needs to be changed to stop such redirection?
Upvotes: 0
Views: 83
Reputation: 154
Try the DirectorySlash
directive that can be use globally or per directory.
http://httpd.apache.org/docs/2.2/mod/mod_dir.html#directoryslash
Upvotes: 1