For some reason, we recieving a bunch of inbound traffic on URLs that contain HTML entities.
E.g.
http://www.ourdomain.com/index.php?key1=value1&am
For any rewrite to work, the rewrite engine must be on, but perhaps you already have that fixed:
# following statement must come before any other rewrite statements
# and must be enabled per virtual host configuration
RewriteEngine On
The ampersand is a special metacharacter. Apparently the people that have copied and pasted your links did so inside an editor which duely escaped the ampersands into &
(or, more technically correct, &
if it happened inside an a-tag). I'm not 100% sure, but I find it likely that the ampersand should be escaped, try this:
RewriteRule \& \&
To find out how the rewrite goes, what it rewrites and why, you should turn rewrite logging on (make sure Apache can write to the location of RewriteLog
):
RewriteLog "somepath.log"
RewriteLogLevel 3
where level 9 is the highest.