Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: .htaccess help |
|
Author |
|
bravors
Joined: 30 Mar 2007 Posts: 3
|
Posted: Fri 30 Mar '07 0:40 Post subject: .htaccess help |
|
|
Hi
Was wondering if the following was possible with .htaccess. I want 2 or 3 ip hosts to be able to connect to a website without a password prompt as they are trusted static IP's. If anyone else connects it I want it to prompt a username and password. This will prevent unknown users or allow known users access if they are using a different PC. Can this be done?
Thanks
Sandy |
|
Back to top |
|
James Blond Moderator

Joined: 19 Jan 2006 Posts: 7406 Location: EU, Germany, Next to Hamburg
|
Posted: Fri 30 Mar '07 9:40 Post subject: |
|
|
Hello Sandy,
the simplest way to keep all others out, but let just a few ppl in with a static adress
Code: |
Order Deny,Allow
Deny from all
Allow from 192.168.1.2 192.168.50.2 200.255.254.230
|
In the docs
As far as I know there it is not possible to ask for a password only from "all other". There is only the option to deny the access or ask all inclusive the IP addresses you want to allow asking for a user and password.
Maybe someone know better  |
|
Back to top |
|
bravors
Joined: 30 Mar 2007 Posts: 3
|
Posted: Fri 30 Mar '07 10:32 Post subject: |
|
|
yeah thought that was the case. Had a look around the docs but couldn't figure it out. I need unknown IP's to be able to access the site as it could be my users logging in from hotels, other laptops etc but I would need a user and pass to confirm this. Maybe the only way is to turn on the user and pass for everyone? |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 614 Location: Milford, MA, USA
|
Posted: Fri 30 Mar '07 13:35 Post subject: |
|
|
Sandy,
The Satisfy Any directive might give you what you are looking for.
-tom- |
|
Back to top |
|
bravors
Joined: 30 Mar 2007 Posts: 3
|
Posted: Fri 30 Mar '07 19:22 Post subject: |
|
|
Exactly what I was looking for. Thanks for the help.
Sandy |
|
Back to top |
|
|
|
|
|
|