POWERFUL ROUTING

ColdBox offers powerful routing capabilities that allow developers to customize URLs and map them to specific actions, views, responses or handlers. With ColdBox, you can create expressive, readable, and SEO-friendly URLs using placeholders, redirects, responses, views, and more.

// Routing with placeholders
route( "/blog/:year-numeric{4}/:month-numeric?/:day-numeric?" )
	.to( "blog.list" )

// Redirects
route( "/old/:book" )
	.toRedirect( "/mybook" )

// Responses
route( "/api/heartbeat" ).toResponse( (event,rc,prc) => {
	return "ok!"
} );

// Show a view
route( "/contact-us" )
	.toView( "main/contact" )

// Expressive Named Routes
route( "/wiki/:page" )
	.as( "page" )
	.to( "wiki.show")

ColdBox routing is highly customizable and flexible, allowing developers to create complex routing rules that match their specific needs.

For more information about ColdBox routing, check out the routing documentation.