Forum Discussion
stolivar_88319
Feb 18, 2009Nimbostratus
Okay, this works
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-For} "!(170\.140|163\.246)\.Ύ-9]{1,3}\.Ύ-9]{1,3}$"
RewriteRule .* - [F]
but now I have an the issue that a number of my .htaccess files have a double challenge. If you are in the list of allowed IP's then you are granted access, if you are denied via IP you are then prompted for basic authentication. The prompt for authentication no longer works when I use the Rewrite rule. Thoughts?
Example:
------------------------new addition-------------
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-For} "!^(10\.[0-9]{1,3}|129\.[0-9]{1,3}|169\.147})\.[0-9]{1,3}\.[0-9]{1,3}$"
RewriteRule .* - [F]
------------------------end new addition------------------
----------------------original file-------------------
order deny,allow
deny from all
allow from kumc.edu
allow from ukans.edu
allow from 169.147
allow from 129.237
allow from 10
AuthType Basic
AuthUserFile /pulse-root/lar/.htpasswd
AuthName "Directory Protected"
Require valid-user
Satisfy any
AddType text/html .html .htm
AddHandler server-parsed .html .htm
---------------------------end origianal file--------------------