restrict by IP or password

I find myself tired of having to answer the pop up authentication box to view my control panel login or other private content.  Most of the time I am at the office so I could just use my IP, however, I do work remote at times as well.   What to do?

Well, you can instruct apache to satisfy either.  Here is a template, just replace with your content:

# start code
AuthUserFile /home/someuser/path/.htpasswd
AuthGroupFile /dev/null
AuthName "login required.."
AuthType Basic
require valid-user
Order allow,deny
Allow from 55.55.55
satisfy any
# end code

The magic takes place with “satisfy any” directive.  If your at one of the listed ips, password authentication is bypassed.

Enjoy and stay secure.

Keywords: Restrict, password, valid, user, IP
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Domain redirect

So you bought another domain name that matches one you currently have.  You shouldn’t...

rewrite base

Top directories can break functionality on sub directories. Case in point:Scenario: WordPress...

rewrite non SSL to SSL

Want to force users to use SSL on your site?Add this code to the top of your .htaccess file, edit...

Traffic source redirect

Need to redirect source traffic to another domain?  Well, if you can’t modify the link...

Restrict access by IP

WARNING:  Backup your current .htaccess file if you have one so you can quickly revert in...