> I want the user to be sent to the page that he originally
> requested after logging in. It should not matter what page
> he tried to get to. He should go to that page, not a page
> that is programmed statically into the login page.
This is pretty simple. Track the requested page URL as a variable, and
redirect to that. For example, if you're using the Session scope, you can
have something like this in Application.cfm:
<cflock scope="session" type="exclusive" ...>
<cfif not IsDefined("Session.LoggedIn")>
<cfset Session.PageToRedirectTo = CGI.SCRIPT_NAME>
<cflocation url="/login/">
</cfif>
</cflock>
Then, in the page that processes the login, you'd simply redirect to the
originally requested page:
<cflocation url="#Session.PageToRedirectTo#">
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
______________________________________________________________________
Why Share?
Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
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