Jump to content

How to password a Unix folder?


TropicalBeach

Recommended Posts

[!--quoteo(post=359649:date=Mar 29 2006, 08:19 AM:name=TropicalBeach)--][div class=\'quotetop\']QUOTE(TropicalBeach @ Mar 29 2006, 08:19 AM) [snapback]359649[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Hi,
Newbie here...

I wish to password a web folder to allow only a few chosen users to see the contents.
Eg. www.foo.com/2006

What Php code is needed?
[/quote]

you can do that with an sql database and have a login page. or you can use somethign as simple as a .htaccess file if you want.

.htaccess files just have to reside in the directory you want to protect (it will protect all subdirectories as well) and force the user to enter a user/pass before entering that dir.
Link to comment
Share on other sites

  • 6 months later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.