Force Apache to Ignore a Request Using mod_rewrite
We have certain IPs that, due to some load balancers and proxies, are tucked away in the X-Forwarded-For header and I have to block them with Apache using mod_rewrite (I know, we're getting a better solution together.) Currently, I'm just sending a 403 but I'd like to just have the request ignored altogether. How can I do this with mod_rewrite? Here's the directives I have now.
RewriteEngine On
Rewrit开发者_开发百科eCond %{HTTP:X-Forwarded-For} ^111.111.111.111.*
RewriteRule .* - [F]
精彩评论