Forum Discussion
stolivar_88319
Nimbostratus
Feb 11, 2009.htaccess no longer denying pages to non specified IP addresses
Seems i have ran into another problem. Websites that have .htaccess files in directories that restrict viewing a page if you don't match an IP isn't working anymore.
my .htaccess look...
stolivar_88319
Nimbostratus
Feb 18, 2009Okay, 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--------------------
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
