.htaccess - different behaviours on different remote hosts

Posted on 2003-02-26
Medium Priority
Last Modified: 2012-05-04
I am running an Apache web server for testing and developement perposes. The whole wwwroot is protected with .htaccess file in order to be viewd only by developers and some other people. But when I work all day it is very unpleasent to get that box asking for username and password each time I start my browser. My question is how can I configure Apache2(win32) or .htaccess file so that from several hosts not to ask for user and password and for all the other hosts to ask.
I hope you understand what I am asking.
Thanks in advance
Question by:zerofill
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

linxit earned 200 total points
ID: 8025452
I think this is the scenario you're after:

<Directory "/wwwroot">
  AuthType Basic
  AuthName "Members Only"
  AuthUserFile /www/passwd/users
  Require valid-user
  Order allow,deny
  Allow from internal.com
  Satisfy any

The 'Satisfy any' directive means that users will be let in if they have a password OR if they are on the internal network.

If you just want to restrict it to a couple of hosts without password, you can replace internal.com with e.g.

Allow from


Author Comment

ID: 8027885
Thanks. It works just fine.

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question