Solved

Dynamic .htaccess Directory Protection

Posted on 2006-06-18
2
175 Views
Last Modified: 2013-12-12
Hi guys,

I wanted to know how I would go about making a dynamic .htaccess file for Directory Protection. I know how to manually edit the file to protect my Directory, but I now want to make use of the large collection of Usernames/Passwords which I have in a MySQL Database, to use as logins for my Directory.

Any ideas?

If you didn't quite understand what I was trying to say, please let me know, and I'll try re-word myself a bit better.

Cheers!
0
Comment
Question by:Cyber-Drugs
2 Comments
 
LVL 10

Accepted Solution

by:
Khanh Doan earned 500 total points
ID: 16929281
If you didn't encrypt ur user's password, you can export it to .htpasswd file
and edit your htaccess like this

    AuthUserFile /home/USERNAME/.htpasswd
    AuthName "restricted access"
    AuthType Basic
    <Limit GET>
    require valid-user
    </Limit>
if you encrypt ur user's password, I don't have any idea :D
Bonmat86.
0
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 16929299
Perfecto!

Cheers! :)
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

770 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