1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

.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