开发者

Force Apache to Ignore a Request Using mod_rewrite

开发者 https://www.devze.com 2023-03-18 22:16 出处:网络
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

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

精彩评论

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