Forum Moderators: phranque
Let's say I want to forbide access to urls that contains in query_string some words (DIDI).
RewriteCond %{QUERY_STRING} !^$
RewriteCond %{QUERY_STRING} DIDI [NC]
RewriteRule . - [F]
Everything is OK with
http://www.example.com/index.html?test=DIDI,
but with didi url encode it's NOT like
http://www.example.com/index.html?test=%44%49%44%49
How can I do this without make something like
RewriteCond %{QUERY_STRING} DIDI¦%44%49%44%49 [NC]
And, unfortunately, it is also possible that the query string may become multiply-encoded if copied from place to place. In that case, you'd need to allow for that as well:
RewriteCond %{QUERY_STRING} (D¦%(25)*44)(I¦%(25)*49)(D¦%(25)*44)(I¦%(25)*49) [NC]
Jim