Block IP based off Header
3 posts
• Page 1 of 1
- youlead514
-
- Posts: 2
- Joined: 28 Mar 2013, 11:13
Block IP based off Header
I'm trying to block access based off the header HTTP_X_FORWARDED_FOR
So if I have a value
HTTP_X_FORWARDED_FOR:11.11.48.55, 112.123.133.200, 192.1.122.52, 79.11.12.33
How can I block all access to my site.
I tried something like this but it doesn't seem to be working
RewriteCond %{HTTP:X_FORWARDED_FOR} 11\.11\.48\.55 / [NC,F,O]
Thank you for your help
So if I have a value
HTTP_X_FORWARDED_FOR:11.11.48.55, 112.123.133.200, 192.1.122.52, 79.11.12.33
How can I block all access to my site.
I tried something like this but it doesn't seem to be working
RewriteCond %{HTTP:X_FORWARDED_FOR} 11\.11\.48\.55 / [NC,F,O]
Thank you for your help
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Block IP based off Header
Hello,
Try using the following:
Regards
Andrew
Try using the following:
- Code: Select all
RewriteCond %{HTTP_X_FORWARDED_FOR} 11\.11\.48\.55
RewriteRule .* - [F]
Regards
Andrew
- youlead514
-
- Posts: 2
- Joined: 28 Mar 2013, 11:13
Re: Block IP based off Header
Perfect that worked, thank you for your help.
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 14 guests