logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: .htaccess help
Author
bravors



Joined: 30 Mar 2007
Posts: 3

PostPosted: Fri 30 Mar '07 0:40    Post subject: .htaccess help Reply with quote

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: 7298
Location: Germany, Next to Hamburg

PostPosted: Fri 30 Mar '07 9:40    Post subject: Reply with quote

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 Wink
Back to top
bravors



Joined: 30 Mar 2007
Posts: 3

PostPosted: Fri 30 Mar '07 10:32    Post subject: Reply with quote

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: 611
Location: Milford, MA, USA

PostPosted: Fri 30 Mar '07 13:35    Post subject: Reply with quote

Sandy,

The Satisfy Any directive might give you what you are looking for.

-tom-
Back to top
bravors



Joined: 30 Mar 2007
Posts: 3

PostPosted: Fri 30 Mar '07 19:22    Post subject: Reply with quote

Exactly what I was looking for. Thanks for the help. Very Happy

Sandy
Back to top


Reply to topic   Topic: .htaccess help View previous topic :: View next topic
Post new topic   Forum Index -> Apache