regex - Blocking hostname if same as IP in .htaccess -
i've been noticing in log files hostname same ip. guessing it's because there no rdns set. being said, how can block in htaccess?
5/17/2014 01:44 pm | ua: mozilla/5.0 (windows nt 6.3; wow64; rv:29.0) gecko/20100101 firefox/29.0 | ip: 50.58.251.66 host: 50.58.251.66 | referrer: (empty) | tor: false | data: [] | post data: []
my htaccess line.
rewritecond %{remote_host} ^%{remote_addr} [nc,or]
i've tested , not seem work. seemed logical me. thoughts?
you can use rule block these requests:
rewriteengine on rewritecond %{remote_host}::%{remote_addr} ^(.+?)::\1$ rewriterule ^ - [f]
Comments
Post a Comment