htaccess mod_rewrite for specific starting substrings only
OK, when reading this question please ignore the fact that the developers should be fixing their out of date plugins... this is another battle being fought elsewhere.
We are trying to block querystrings in the format of mydomainname.com/?q=anytexthere
I have successfully used this code in the htaccess file:
Well, as mentioned in the question, this unfortunately stops timthumb requests from working because timthumb requests also have a parameter in the querystring of "q=". However, in timthumb the q= parameter is always at the end of the querystring, but the exploit we want to stop, always has just a q= parameter on it's own, straight after the '?'
Ah Dan... that works a treat. Can I include empty parameter in that too, i.e. ?q= with nothing after it, (currently this is not caught and get's through to the exploit).
Open in new window
HTH,
Dan