Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 3 of 3

This is a discussion on authenticated redirection in the Shared & Semi-Dedicated forum
I'm looking for a script that would allow my users to login via a password and username and then forward them to a specific URL. ...

  1. #1
    JPC Guru
    Join Date
    Oct 2004
    Location
    USA
    Posts
    258

    authenticated redirection

    I'm looking for a script that would allow my users to login via a password and username and then forward them to a specific URL. The scripts I've tried have not worked out so I am looking for sugestions.

    Anyone here know of a good passworded redirect script?

  2. #2
    JPC Guru
    Join Date
    Oct 2004
    Location
    USA
    Posts
    258
    Anyone? *cricket* *cricket*

  3. #3
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    I don't know of a "canned" script to do this, but I write this functionality into many of my projects myself. My method is to add code to the top of my scripts to detect if someone is logged in (and in more advanced situations, to check if they are allowed to access the requested page). The everything is OK they see the page. If not they get a login form and/or a "Not Authorized" message.

    Psudo-code:
    Code:
    If session/environment/cookie value doesn't indicate login
        redirect to/show login form
        exit script - nothing more will be run after this
    end if
    
    normal code here - will never get run if the script encounters the exit above
    On the login side I check for either the HTTP_REFERER value or a redirect variable passed in the query string that indicates the page that the user got bounced from. Upon successful login I use that value to send the user back to the page they wanted.

    I don't know if any of this will help you or not. Let me know if I can assist you further.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •