Under the NE (noescape) flag in the Apache mod_rewrite manual it states:
By default, special characters, such as & and ?, for example, will be converted to their hexcode equivalent. Using the NE flag prevents that from happening.
However, in my experience (per-directory .htaccess files) the & and ? characters are not percent-encoded and the NE flag is not necessary in this case!? Is the manual wrong, or am I missing something? The following works OK for me:
RewriteRule ^pattern substitution?foo=1&bar=2 [R=301,L]
The example given in the manual uses a # (fragment identifier) and yes, this would normally be encoded, so the NE flag would be required in this instance. So, I agree with their example, but not with the statement before it and it's bugging me!?