Forum Discussion
stolivar_88319
Feb 13, 2009Nimbostratus
I haven't head back from my network guys yet.
I did find this at http://www.it.emory.edu/showdoc.cfm?docid=11252&fr=1092
Apache Notes
Because of a quirk of our load balancer configuration, all incoming requests seem to come from the load balancer's IP address. If you want to restrict access to content based on source IP address in a .htaccess file, something like this will not work:
deny from all
allow from 170.140.0.0/16 163.246.0.0/16
Instead, use mod_rewrite to inspect the X-Forwarded-For header:
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-For} "!(170\.140|163\.246)\.[0-9]{1,3}\.[0-9]{1,3}$"
RewriteRule .* - [F]
But I can't get it to work when I change the condition to my IPs, just blocks everything.