Portal Home > Knowledgebase > Articles Database > .htaccess issue.
.htaccess issue.
Posted by clangeddin, 09-11-2008, 12:04 PM |
Hi, Im new to the forum and have a complex question i guess, or at least it is to me lol.
Issue: what i am looking to do is have one login so mysite/login/ that brings up login prompt from there you type in username and password and then it sends you to mysite/"userdir" and have 75ish users
Comment: Any point in direction would be great, i am using php for 99% of all of my content. i tryed using a db to hold user name and pass but i still have no way to say once you login go here or here based on username.
|
Posted by Jonathan Kinney, 09-11-2008, 02:41 PM |
I am sure that if you are using PHP and having it authenticate users via a database, if they authenticate correctly, you should be able to direct them to a URL/$variable or something of the like. Not being a PHP programmer I can not give you any direct code examples.
You may be able to use a .htaccess, if after authentication it can use the user as a variable in a rewrite rule. I suppose a place to start would be here http://httpd.apache.org/docs/2.0/misc/rewriteguide.html and that will at least give you an idea of what URL rewrites are possible. You asked for any pointer, so here is one.
|
Posted by clangeddin, 09-11-2008, 02:44 PM |
at least this will give me something to look in to. i have been banging my head on this one.
|
Posted by joeshacks, 09-11-2008, 02:59 PM |
do you have mod_auth_mysql installed? if so, you can check this out..
http://www.diegonet.com/support/mod_auth_mysql.shtml
if not, a auth script in php is pretty easy to match users and passwords in a database table..
you can use php to mimic the login box, this should get you started:
http://us2.php.net/features.http-auth
|
Posted by clangeddin, 09-12-2008, 12:07 PM |
I ended up just going with sessions. All that I am working on now is just getting the correct information to be pulled from database. so Thanks for your help.
|
Add to Favourites Print this Article
Also Read
Nocster Down? (Views: 633)