Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Dynamic .htaccess Directory Protection

Posted on 2006-06-18
2
Medium Priority
?
189 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 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
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 …
Suggested Courses

926 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