I\'ve been looking at the [NE] (noescape) flag in mod_rewrite. After some thought I couldn\'t figure out a situation when I would NOT want to use the f
The [NE] flag is extremely useful when you are adding the request url as part of - let's say - an authorization signature.
I just had a bug where authorization was working with .htaccess off but not with it on. It turned out the cause was that redirection was url encoding the items that ended up in the php $_GET parameter. To solve the bug I changed:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*[^/0-9])$ $1/ [R=301,L]
to
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*[^/0-9])$ $1/ [NE,R=301,L]
(the authorization signature is composed of many things, one of these is the request url)