Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb Site ManagementScripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old January 17th, 2005, 11:28 AM
Homer Glemkin Homer Glemkin is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 8 Homer Glemkin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 27 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old January 17th, 2005, 04:16 PM
jharnois's Avatar
jharnois jharnois is offline
mod_dev_shed
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Sep 2002
Location: Atlanta, GA
Posts: 14,299 jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 2 Days 1 h 54 m 17 sec
Reputation Power: 760
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb Site ManagementScripts > Scripting redirection depending on username


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway