View previous topic :: View next topic |
Author |
Message |
acecombat -
Joined: 29 Sep 2005 Posts: 31
|
Posted: Sat Oct 08, 2005 10:04 pm Post subject: Different directory with different user ID's |
|
|
Hey guys,
Any idea how to have a passworded folder say //root//secure/
protected with a password, but that changes which subfolder it goes into if you use a different user ID.
i.e.
//root//secure/user1/ - When signing in with user id 1
//root//secure/user2/ - When signing in with user id 2
etc.
So basically I want a page in //root//secure that needs a password entered before accessing it, but then from there goes to a subfolder depending on the user ID used. |
|
Back to top |
|
 |
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Sat Oct 08, 2005 11:06 pm Post subject: |
|
|
Just use the built in password system for abyss. _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Sat Oct 08, 2005 11:39 pm Post subject: |
|
|
There is no built in way to my knowlage with Abyss. But you could make an index page to redirect them according to their user id with ease. _________________
 |
|
Back to top |
 |
 |
acecombat -
Joined: 29 Sep 2005 Posts: 31
|
Posted: Sun Oct 09, 2005 1:06 am Post subject: |
|
|
How could you make a page, that requires the .htaccess style password/username authentication, that after entering thier user ID redirects them? |
|
Back to top |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Sun Oct 09, 2005 2:29 am Post subject: |
|
|
acecombat wrote: | How could you make a page, that requires the .htaccess style password/username authentication, that after entering thier user ID redirects them? |
Send them to mywebroot/secure and on there put a something made by a third party, E.G. a cgi script, that redirects them using environment variables. When someone identifys sucessfully using the built-in protection system, then 2 environment variables are created for the user and the password; all your third party object would have to do is redirect them to /secure/{HTTP_AUTH_USER}. (Check the name on that.) _________________
 |
|
Back to top |
 |
 |
acecombat -
Joined: 29 Sep 2005 Posts: 31
|
Posted: Sun Oct 09, 2005 3:04 am Post subject: |
|
|
Do you know the name of a script that can do this? |
|
Back to top |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Sun Oct 09, 2005 5:37 am Post subject: |
|
|
acecombat wrote: | Do you know the name of a script that can do this? |
In php, cause I suck at most others.
Code: |
<?php
if (!$_ENV['PHP_AUTH_USER'])
header("Location: /secure/");
header("Location: /secure/".$_ENV['PHP_AUTH_USER']."/");
?>
|
Note: I don't actually know if abyss generates PHP_AUTH_USER; one way to find out. _________________
 |
|
Back to top |
 |
 |
acecombat -
Joined: 29 Sep 2005 Posts: 31
|
Posted: Sun Oct 09, 2005 6:43 am Post subject: |
|
|
SO this would go to //root//secure/*whatever user name was enterd*??? |
|
Back to top |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Sun Oct 09, 2005 6:49 am Post subject: |
|
|
acecombat wrote: | SO this would go to //root//secure/*whatever user name was enterd*??? |
Is this from your webroot or from a linux filesystem?
Assuming you called msn.com/secure, and logged in as dave, it would then take you to msn.com/secure/dave.
Edit to suit your needs. _________________
 |
|
Back to top |
 |
 |
acecombat -
Joined: 29 Sep 2005 Posts: 31
|
Posted: Mon Oct 10, 2005 5:26 am Post subject: |
|
|
Cool....just what I needed!!! Thanks! |
|
Back to top |
|
 |
|