I suppose you could but it would be a variable that is constantly changing
with every page request. I'd personally use the url scope.

..:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 

 


-----Original Message-----
From: Doug Brown [mailto:[EMAIL PROTECTED] 
Sent: Sunday, December 17, 2006 9:19 PM
To: CF-Talk
Subject: Re: Login page and cflocation

Bobby,


Would it be possible to set this value in the index.cfm itself in the
session scope?

<cfset session.lastPageVisit = "#cgi.script_name##cgi.query_string#">

and then do a regular <cflocation url="#session.lastPageVisit#"> after login




Doug






----- Original Message -----
From: "Bobby Hartsfield" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Sunday, December 17, 2006 7:11 PM
Subject: RE: Login page and cflocation


> If you are using one index.cfm with a huge cfswitch then you are most
likely
> deciding which cfcase to run based on a url variable or variables.
>
> When you redirect to the login page, send the cgi.script_name and
> cgi.query_string. When they login, use those to send them back to the
> original location.
>
>
> ..:.:.:.:.:.:.:.:.:.:.:.
> Bobby Hartsfield
> http://acoderslife.com
>
>
>
>
> -----Original Message-----
> From: Doug Brown [mailto:[EMAIL PROTECTED]
> Sent: Sunday, December 17, 2006 4:12 PM
> To: CF-Talk
> Subject: Re: Login page and cflocation
>
> Well, I think the problem I am having is that all my pages are called via
> cfcase from index.cfm within each directory. Would saving the refer that
way
> solve the problem?
>
>
>
>
> Doug
>
>
>
> ----- Original Message -----
> From: "Snake" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[email protected]>
> Sent: Sunday, December 17, 2006 12:17 PM
> Subject: RE: Login page and cflocation
>
>
> > Why not save the refer on the login page, and redirect to it after
login.
> >
> >
> > -----Original Message-----
> > From: Doug Brown [mailto:[EMAIL PROTECTED]
> > Sent: 17 December 2006 18:42
> > To: CF-Talk
> > Subject: Login page and cflocation
> >
> > I am needing to send a user back to the page they were previously at
prior
> > to login, and I have a small problem. Below is the code I am using to
send
> > the user back, but it will not work properly. What happens is that a
user
> > views a page that is in the root directory of the site and when they hit
a
> > page that requires login, they are sent one directory down to the login.
I
> > cannot seem to be able to relocate them back to the root folder after
> login.
> >
> > Dir Structure
> >
> > ROOT
> >     Page that needs login
> >     DIRECTORY_1
> >             Login_page
> >
> >
> > <CFIF IsDefined("Session.RUserName")>
> >  <CFIF Session.RUserName is "Guest">
> >   <CFPARAM name="attributes.thispage"
> > default="#GetFileFromPath(GetTemplatePath())#">
> >   <CFPARAM name="attributes.querystring" default="?">
> >   <CFPARAM name="attributes.variablestring"
default="#CGI.QUERY_STRING#">
> >   <CFSET thispage = attributes.thispage>
> >   <CFSET querystring = attributes.querystring>
> >   <CFSET variablestring = attributes.variablestring>
> >   <CFLOCATION
> >
>
url="index.cfm?page=login&requested=#thispage##querystring#&string=#variable
> > string#" addtoken="no">  </CFIF> </CFIF>
> >
> >
> >
> > Any help is appreciated!!
> >
> >
> > Doug
> >
> >
> >
> >
> >
> >
>
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264278
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to