>- see footer for list info -<
> You could do this by appending the following to all links.
> #UrlEncodedFormat("#script_name#?#query_string#")#
That's close to how we've done it, but instead of using
URLEncodedFormat() we use tobase64() instead (all we're trying to do is
generate a string that can be stuck in the URL, not encrypt it).
When the login page is displayed, if there's a "return" URL var then we
stick that in a hidden form field. Once the user's logged in, if that
"return" var is set, we simply decode the base64 encoded string and
redirect the user.
Using this method, there's no need to rely on any cookies, database,
session vars or client vars etc. Example code below -- obviously this
isn't optimsed and will probably require checking on the encoded URL
passed through etc.
<!--- from sessioncheck.cfm --->
<cfif memberNotLoggedIn>
<cfset thisURL = cgi.script_name & "?" & cgi.query_string>
<cflocation url="login.cfm?return=#tobase64(thisURL)#">
</cfif>
<!--- from login.cfm --->
<cfif isdefined("url.return")>
<cflocation url="#tostring(tobinary(attributes.return))#">
</cfif>
Tim.
--
-------------------------------------------------------
Badpen Tech - CF and web-tech: http://tech.badpen.com/
-------------------------------------------------------
RAWNET LTD - independent digital media agency
"We are big, we are funny and we are clever!"
New site launched at http://www.rawnet.com/
-------------------------------------------------------
This message may contain information which is legally
privileged and/or confidential. If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
-------------------------------------------------------
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<