Solved

.htaccess file help needed

Posted on 2013-01-10
4
346 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 35

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Suggested Solutions

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This article discusses how to implement server side field validation and display customized error messages to the client.
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 learn how to dynamically set the form action using jQuery.

734 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