I need to redirect file requests that contain RS= in that order. I've tried:
RewriteRule ^([RS]{2}=)
What's with the parentheses and brackets? If you're matching literal text, a simple
^RS=
will do. The form
[RS]{2}
is only necessary if you need to match all of:
RR
RS
SR
SS
You don't need parentheses if you're not capturing for reuse. And you DEFINITELY don't need a closing anchor, since that would only match requests for
"www.example.com/RS="
exactly and that's all.
No leading / slash. That's only for rules lying loose in your config file, and I assume this is happening in htaccess.
(Equals signs in your URLs? Really? I hope you're redirecting in order to get rid of them!)
Oh, and, ahem, the target is
http://www.example.com/
and that's all. No "index.html". I hope you've got the appropriate [R=301,L] flags; hard to tell if that was just a selective cut-and-paste.
Edit: The body of your post said "contain" but the subject header said "first three characters" so I assumed that was what you meant.
Further edit: I'm overlapping with g1. If = signs are flatly forbidden in paths, then obviously there's something more to the question.