Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Please help rewrite proper parameter (no replies)

$
0
0
Hi,

Sometimes, bots are notorious for doing that, arguments are over urlencoded. If someone knew a way to rewrite them back to their normal state, that would be awesome.

e.g.

Normal URL: www.site.com/file.php?param=blahblah

URLs that bots try sometimes (often in fact - don't know where they get those strings BTW):

www.site.com/file.php?param%253Dblahblah
www.site.com/file.php?param%25253Dblahblah
www.site.com/file.php?param%2525253Dblahblah
...

Tried the following in the general filter block, then into the php block, didn't help:

rewrite ^(.*)(param)\%(25)+(3D)(.*)$ $1$2=$5 redirect;
rewrite ^(.*)(param)=(.*)$ $1$2=$3 redirect;

Thanks!

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>