Hey Paul,

I've got a check in the application.cfm file that displays the login form
and <cfabort>s any further processing if they are not logged in or they
timeout. In the login page, I've got the form action dynamically generated
based on the page the user was requesting. That way when they authenticate
through the login form, it spits them back to the page they were requesting.

Kind of similar to the other posts using CGI vars, but I want to make sure I
catch the people that decide to bookmark a certain page in the secured area
and therefore do not have a cgi.http_referer variable. Here's an example,
I'm sure there's a better to do the <cfif> statement - this was done for
speed's sake:

<cfif isDefined("CGI.QUERY_STRING")><cfset host = "http://"; &
CGI.SERVER_NAME & CGI.PATH_INFO & "?" & CGI.QUERY_STRING><cfelse><cfset host
= "http://"; & CGI.SERVER_NAME &
CGI.PATH_INFO></cfif><cfoutput>#host#</cfoutput>



-----Original Message-----
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]] 
Sent: Friday, August 09, 2002 2:10 PM
To: CF-Talk
Subject: Redirection after login


Got a question for you folks.

If I try to access this page:
http://www.domain.com/page.cfm?param1=value1&param2=value2&param3=value3

And I have a check on that page that sees if a user is logged in, and if
they are, no problem display the page, if they aren't, I want to redirect
them to a login.cfm page that will let them log in and then return them to
wence they came, back to the above url.

Note: the url above is unknown .. it could be "anotherpage.cfm?param1 ....."

How are you all doing this?  Are some of u just passing the location as a
url variable?

Just looking for some good suggestions for dynamically returning folks from
where they came.  A best practice sorta thing!

Thank You
Paul Giesenhagen
QuillDesign


______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to