Solved

.htaccess file help needed

Posted on 2013-01-10
4
339 Views
Last Modified: 2013-01-13
I'm trying to pw protect a root folder 'myFolder' and leave the other folders accessible to the public i.e. bobsFolder, suesFolder etc.

can someone show me a sample of how this would be done and I can fill in the blanks?
0
Comment
Question by:tf2012
4 Comments
 
LVL 4

Accepted Solution

by:
schubach earned 250 total points
ID: 38763914
In the root folder, put a .htaccess file like this
authtype basic
authuserfile /usr/local/httpd/users
authname "My Database"
require valid-user
satisfy all

Open in new window


Then in each subfolder, put a .htaccess file like this:
satisfy any

Open in new window

0
 
LVL 7

Assisted Solution

by:Vimal DM
Vimal DM earned 125 total points
ID: 38766113
http://www.addedbytes.com/blog/code/password-protect-a-directory-with-htaccess/
-------------------------------------------------------------------------------------------------------------

Options -Indexes
<FilesMatch "htmltest[0-9]?\.html$">
    Order Allow,Deny
    Deny from all
</FilesMatch>
0
 
LVL 34

Assisted Solution

by:gr8gonzo
gr8gonzo earned 125 total points
ID: 38767206
0
 
LVL 1

Author Closing Comment

by:tf2012
ID: 38772462
thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

914 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now