View Full Version : Question about .htaccess
unconnected
08-23-2002, 09:11 PM
I was wondering how I would get an .htaccess page to reference multiple .htpasswd files properly?
Lets say I want to use 4 CC processors and I want them all to have their own seperate .htpasswd files..
How do I get the .htaccess file to look through them all when asking a user to enter their login info?
AgentCash
08-23-2002, 09:34 PM
Best advice I can give you is to check out
http://freshmeat.net/projects/mod_auth_mysql/
and use a database system for passwords.
Or check out
http://www.paysitepowertools.com/os-multimodauth.html
the short answer is that you dont.
the quick answer is to modify the cc processor code that writes to the htaccess to put a third field in the .htaccess with the processor id
i.e.
username:password:processor
alternatively, using dbm or mysql for authentication will work
Freakster.net
08-23-2002, 11:19 PM
Instead of a premade script I'd use c/perl/php to insert accounts in mysql and a crontab to generate the .htpasswd every 5-10 mins... more control I'd say...
Energy Hosting
08-24-2002, 02:14 AM
and as for me?
I like to do things the easy way:
http://realtimescripts.com/docs/merge.htm
unconnected
08-24-2002, 06:00 AM
Hmm, that merge script just might do the trick..
how much CPU do you think a script like that would take once the .htpasswd file started gettting 10-20k+ logins in it?
and you were executing it every 2 minutes or so..
that is when it might become a problem..
but for now it will work great!
I know there is a way to do it through apache though, I have seen it done, I just don't know :(
Energy Hosting
08-24-2002, 02:00 PM
Originally posted by unconnected
Hmm, that merge script just might do the trick..
how much CPU do you think a script like that would take once the .htpasswd file started gettting 10-20k+ logins in it?
Almost nothing, assuming your server is configured properly.
Freakster.net
08-24-2002, 11:58 PM
I dont think a simple merge of two text files could really make your server rush at all... it can process way more ;)
I guess my database solution would be way smaller than that... I just like mysql to keep the most information possible on my members ;)
vBulletin® v3.7.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.