Relocate() and non-SES URLs

Hi,

I have an app build with ColdBox 6.2.1 using non-SES URLs (“index.cfm?event=hello.index”). I tried updating to the latest ColdBox 6.8.0, and I noticed that with latest version, for example relocate( “hello.index” ) generates SES URLs by default (“hello/index”), and I didn’t find a way to change this behaviour.

So, my question is: Is there a way to disable relocate() from generating SES URLs?

br,
Antti

Hi Antti,

URL routing is the standard in 6 going forwards. Incoming urls are still supported that are non routable, but construction of routes internally always are in routable mode.

If you still want to keep the old behavior you will have to add a controller decorator to override the relocate method and build the URL’s as you see fit. You can also create a request context decorator and add your methods there to fit your requirement needs.

Thank you Luis for your reply!

Using a decorator sounds like a good way to solve it, at least temporarily, until the application is configured and refactored to properly support the SES URLs.

-Antti