Solved

Dynamic .htaccess Directory Protection

Posted on 2006-06-18
2
173 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

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

932 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

12 Experts available now in Live!

Get 1:1 Help Now