Hello, i'm having a small problem here. I'm using a simple rule to redirect all requests to a script, excepts some folders with static content :
RewriteEngine On
RewriteCond $1 !^(templates|css|js|uploads)/(.*)$
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]
Most of the time, the redirection is good and transparent. But if the folder matching the URL exists and if i don't put the last "/", i will have a 301 redirect.
Examples : (the folder gallery doesn't exists but mods does)
- ht*p://localhost/test/gallery/ -> OK
- ht*p://localhost/test/mods/ -> OK
- ht*p://localhost/test/mods -> 301 redirection to ht*p://localhost/test/mods/?url=mods
I have this problem on all apache2 servers (tested Fedora, Debian, Windows).
Someone knows how to solve this ? Thanks