View Full Version : [other] .htaccess - require name and allow domain?

April 29th, 2008, 10:33 PM
Hi guys,
I am using Apache basic authentication to prompt for a username and password.
This works fine.
Is it possible however to also allow access from a given domain name and only prompt for the user details if they are not from that domain???

THanks for your help,

The Tronyx
April 30th, 2008, 07:26 AM
There is no way to do that which I am aware of using basic Apache authentication. This is not to say that it cannot be done, but I am not aware of a way to do so.

April 30th, 2008, 07:57 AM
you can limit by a certain country but not by domain.

May 1st, 2008, 07:14 PM
Thanks for the replys.
I will just have to work something else out :)


May 3rd, 2008, 09:47 PM
i've been using something like this for a number of years to keep people out of my web site stats. works as expected: user/password required unless if accessing from the listed domain.

Order Deny,Allow
Deny from all
AuthType Basic
AuthName "Secured Area"
AuthUserFile "/path/to/passwords/.passwd"
Require valid-user
Allow from auto-authorized-domain.com
Satisfy Any

note that i use apache 1.3.whatever; dunno if apache 2 would be different or not.