开发者

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]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜