RE: Login page and cflocation

2006-12-17 Thread Snake
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=loginrequested=#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:264265
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Login page and cflocation

2006-12-17 Thread Doug Brown
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 cf-talk@houseoffusion.com
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=loginrequested=#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:264268
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Login page and cflocation

2006-12-17 Thread Will Tomlinson
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?

What if you used a root relative link instead? 

/index.cfm

Will

~|
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:264271
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Login page and cflocation

2006-12-17 Thread Denny Valliant
On 12/17/06, Will Tomlinson [EMAIL PROTECTED] wrote:
 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?

 What if you used a root relative link instead?

Or just grab the current URL right when you determine they're not
logged in, stick it in a session var, and /then/ redirect.  Only grab
it if it isn't the login page, of course- wouldn't want an endless loop.

I think it's just a chicken before the egg type deal.  Grab the requested
URL before you redirect, and it's all good.

I tihnk.
:D

~|
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:264272
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Login page and cflocation

2006-12-17 Thread Doug Brown
Tried a relative link, and it is a :-(  I am not sure about grabbing the url
before redirecting. I suppose setting in the session scope would be the only
way to do it that way. There has to be another way to accomplish this. I
mean hell, somebody has had to come across this before. I vote for a
modification to the cflocation tag in CF to supposrt redirecting to the
first page request!!



Doug



- Original Message -
From: Will Tomlinson [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Sunday, December 17, 2006 3:46 PM
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?

 What if you used a root relative link instead?

 /index.cfm

 Will

 

~|
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:264273
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Login page and cflocation

2006-12-17 Thread Denny Valliant
On 12/17/06, Doug Brown [EMAIL PROTECTED] wrote:

 Tried a relative link, and it is a :-(  I am not sure about grabbing the
 url
 before redirecting. I suppose setting in the session scope would be the
 only
 way to do it that way. There has to be another way to accomplish this. I
 mean hell, somebody has had to come across this before. I vote for a
 modification to the cflocation tag in CF to supposrt redirecting to the
 first page request!!


Heh!  Well, there's always shuffling it along in the url or form scope.
Same concept.  Just avoid the endless loop, and you're in like Flynn.


~|
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:264275
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Login page and cflocation

2006-12-17 Thread Bobby Hartsfield
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 cf-talk@houseoffusion.com
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=loginrequested=#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:264276
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Login page and cflocation

2006-12-17 Thread Doug Brown
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 cf-talk@houseoffusion.com
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 cf-talk@houseoffusion.com
 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=loginrequested=#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:264277
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Login page and cflocation

2006-12-17 Thread Bobby Hartsfield
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 cf-talk@houseoffusion.com
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 cf-talk@houseoffusion.com
 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=loginrequested=#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