redirectTo usage

11 views
Skip to first unread message

Parker

unread,
Feb 9, 2012, 7:40:37 AM2/9/12
to ColdFusion on Wheels
Hello

regarding the redirectTo() when trying to redirect the user after a
login back to the home page.

Currently after the user logs in I'm using <cfset
redirectTo(controller="Index")> for the redirect, however the
resulting url is http://localhost:8888/index.cfm/index and my goal is
just http://localhost:8888/index.cfm or http://localhost:8888/ if
possible.

How would one achieve this?

Cheers

Tom King

unread,
Feb 9, 2012, 7:59:39 AM2/9/12
to cfwh...@googlegroups.com
Could you not use a route?

i.e in your routes config file:
 <cfset addRoute(name="home", pattern="", controller="main", action="index")>

Then in your controller:
<cfset redirectTo(route="home")>


Parker

unread,
Feb 9, 2012, 8:02:54 AM2/9/12
to ColdFusion on Wheels
Perfect, Thank you!
Reply all
Reply to author
Forward
0 new messages