.htaccess password protection: IP range exception?

Discussion in 'Apache' started by Hade, Apr 23, 2008.

  1. #1
    Hi,

    I've set up password protection using .htaccess on my apache Windows web server.

    How can I grant access to 192.168.*.* without asking for a password, and only require login for other IP addresses?


    Here's the password protect code in my .htaccess file:

    AuthUserFile c:\Inetpub\.htpasswd
    AuthName "Restricted Area"
    AuthType Basic
    require valid-user
    
    Code (markup):
    I'd like to combine it somehow with the IP based access code:

    Order deny,allow
        Allow from 192.168.
    Code (markup):
    Thanks!
     
    Hade, Apr 23, 2008 IP
  2. Hade

    Hade Active Member

    Messages:
    701
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    90
    #2
    Found a solution!
    This did the trick:

     
    Hade, Apr 23, 2008 IP