June 13, 2025
cflocation infinite loop HELP!
Comments
(2)
June 13, 2025
cflocation infinite loop HELP!
Newbie 1 posts
Followers: 0 people
(2)
Need some help here. Thanks in advance. 
 
I have these 2 files.
t1.cfm cflocation to t2.cfm and end at t2.cfm.
 
 
it works as expected i.e stop at t2.cfm  display “Hello world”. You will see some screen messed up but never mind I just wanted to show you the problem. 
 
 
with the “/” at the end or just add whatever text after the “/”  it will go into infinite loop, redirected too many times. 
 
and now the url becomes https://www.skillon.com/cflocation/t1.cfm/t2.cfm
 
Anyone has any what is the issue here?
 
t1.cfm
<cflocation  addtoken=”no”  url=”t2.cfm”> 
 
t2.cfm
Hello world..
 
Thank you very much. 
2 Comments
2025-06-16 19:36:43
2025-06-16 19:36:43

To me, this URL is not performing as you’d expect because, I suspect, it is NOT calling “t1.cfm”:

https://www.skillon.com/cflocation/t1.cfm/

Once you put the slash (/) on the end, your web server is probably thinking you’re trying to calling the ‘default document’ of the directory “t1.cfm”.  In many cases, default documents are something like: index.cfm.

So, find out what the default document is on the web server and you’ll know what file is actually being executed.

Like
()
2025-06-16 16:44:53
2025-06-16 16:44:53

You seem to be suggesting that if we run those same URLs, we will get what you describe. But I do not. If I run the first one, it stays on t1.cfm and reports a 404 (which seems to be a missing template handler in your app, not just a bare named 404.) But if I visit the second url, I get the same–I never get any infinite loop. And there’s no difference if I change what follows the slash.

Since you describe this as something unexpected, it seems you feel “it was working before”. What has changed for you since it was last working? What CF version are you running now, and what were you running then? If it’s changed, was it on the same machine, and was the url the same before as it is now. Had you recently applied a CF update? If so, what did you go from and what did you go to?

Even if we can’t recreate your problem, perhaps we can surmise what may have happened, depending on what on your end had changed. (If you may want to say “nothing has changed”, again please at least confirm the CF version and update level.)

Like
()
Add Comment