Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Dynamic .htaccess Directory Protection

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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
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 count occurrences of each item in an array.

670 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