|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Scripting redirection depending on username
Is there an easy way to script the following, or is one language better for this than another? Also can this be accomplised in conjunction with htaccess?
Here's what I need to do: User A has the proper username & password to go to \\foobar.com\weba User B signs in but does not have access to \weba so get redirected to \\foobar.com\webb where their username is check to see if they have access here if not they get sent to \\foobar.com\noauth. So User A can just get into Web A, User B can't get into Web A is redirected to see if they have Authorization for web B if they do there in if not they get booted to the Noauth page. |
|
#2
|
||||
|
||||
|
Any server-side language should easily be able to handle the conditional redirection. I think your question should be more along the lines of which language is easier to do authentication in? And the answer to that one is simply whichever language you know best (vague I know).
As for begin able to use .htaccess ... you might be able to do this with mod_rewrite. I think you should be able to test what site they're viewing, determine if the response is a 403 (provided your auth system throws a 403 server response) redirect to B, test again, then redirect a third time. It's only a theory.
__________________
# Jeremy Explain your problem instead of asking how to do what you decided was the solution. |
![]() |
| Viewing: Dev Shed Forums > Web Site Management > Scripts > Scripting redirection depending on username |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|