www.webdeveloper.com
Results 1 to 3 of 3

Thread: htaccess question

  1. #1
    Join Date
    Feb 2007
    Location
    New Zealand
    Posts
    190

    htaccess question

    Is there a way to specify certain ip's to circumvent basic htaccess authentication?

    I'm wanting it so that if someone from the internet accesses my site, they have to enter a password, but if i access it from localhost, it doesn't.

  2. #2
    Join Date
    Feb 2009
    Posts
    3
    Code:
    AuthName "Authorised Users Only."
    AuthType Basic
    AuthUserFile /.htpasswd
    require valid-user
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    Allow from your.static.ip.addr
    Allow from anyone.else.ip.addr
    Satisfy Any

  3. #3
    Join Date
    Feb 2007
    Location
    New Zealand
    Posts
    190
    wow. that works beautifully. thank you very much

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles