Solved

.htaccess file help needed

Posted on 2013-01-10
4
338 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

These days socially coordinated efforts have turned into a critical requirement for enterprises.
This article discusses how to create an extensible mechanism for linked drop downs.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

747 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

13 Experts available now in Live!

Get 1:1 Help Now