| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| When a user's session times out as specified in cfapplication sessiontimeout, my users are directed to a page if they hit refresh or click on one of the page links. Works just like it should, however... Where/how do I specify the page to which I would like them redirected? |
|
#2
| |||
| |||
| If you do not have too many pages, you can put the session check and redirection at the top of each template. If on the other hand you have many pages, it may be advisable to use a custom tag to do the check and redirection. Use a session variable that is unique to the user and always exists during the user?s session. <cfif not isDefined("session.memberId")> <cflocation url="loginPage.cfm" /> <cfabort /> </cfif> |
|
#3
| |||
| |||
| |
|
#4
| |||
| |||
| If the redirection is put inside Aplication.cfc/cfm, once the session times out the user will never be able to get back in. The user will be redirected at every attempt to open a page. |
|
#5
| |||
| |||
| well, obviously, put the redirect code inside a cfif which does not redirect for a page (or pages)you want to send the timed-out user to. Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ |
|
#6
| |||
| |||
| Thanks for all of the suggestions. The redirect at the top of each page did not work. The "session timed-out" redirect was apparently happening in application.cfm. I have a weird web site which is a web site in wwwroot, with an application.cfm, and another web site in a directory in wwwroot, with a second application.cfm. When I hit the time-out, I was actually being sent back to the application.cfm in wwwroot. So, in the wwwroot appl.cfm, I added a check for a timed out session and a check for HTTP_REFERER from the second web site, and that works. |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.