Hi Jack, The choice of "referrer" for your file name variable seems like it might be a bit confusing -- since it's not actually a referrer until you've directed the user to the next page, which occurs after the variable is set. I'd change it to "currentlocation" or similar to avoid that confusion, although that's not going to help with your problem...
I also don't see the variable "cflogin" declared anywhere above that portion of your Application.cfm and as a result, <cfif not isDefined("cflogin")> will always evaluate true and redirect the user. I don't think it will hurt anything for it to be in the Application.cfm, it just won't have any effect on the page. You might want to try using cgi.script_name instead of cgi.path_info. I can't remember the specific circumstances, but I do know I've seen them not be the same value and iirc when they weren't the same, path_info was actually an empty string, so it could be that the value of "referrer" is "" even when the template being called is in fact login.cfm -- or better yet don't rely on the cgi variables at all and use getBaseTemplatePath() instead. hth > Hey, folks. Having a bit of trouble setting up a basic > application based user authentication on my site. I keep > getting an error in mozilla-based browers, "redirection > limit for this URL exceeded", that sort of thing. In IE, > it just won't load at all - eventually gives me a server > unavailable error. > I've been browsing through forum posts on this sort of > problem, and it seems it's sometimes related to > cflocation, though I haven't been able to find any sort of > clear explanation. > Anyway, here's my application.cfm code: > <cfsetting showdebugoutput="no"> > <cfapplication name="02133" sessionmanagement="Yes" > setclientcookies="Yes" > applicationtimeout="#CreateTimeSpan(0,0,3,0)#"> > <cfparam Name="Application.DSN" Default="MassInc2"> > <cfparam name="Request.Debug" default=""> > <cfparam Name="Application.SearchCollectionName" > Default="02133"> > <!--- check if user has logged out ---> > <cfif IsDefined("Form.logout")> > <cflogout> > <cflocation url="/index.cfm"> > </cfif> > <!--- check if user is logged in ---> > <cfset referrer = GetFileFromPath(CGI.Path_info)> > <cfif referrer neq "login.cfm"> > <cfif NOT IsDefined("cflogin")> > <cflocation url="login.cfm"> > <cfabort> > </cfif> > </cfif> > What I'm looking for this to do is, if a user hasn't been > logged in, send them along to login.cfm - unless, of > course, they're already there. > Any idea why I'm getting this redirection limit error when > I try to call up any of the pages in this application? > Thanks! s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://macromedia.breezecentral.com/p49777853/ http://www.sys-con.com/author/?id=4806 http://www.fusiontap.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200233 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54