I used coldbox 7. I added the setbaseurl based on the appmapping and added the route in the router.cfc.
if( len(getSetting(‘AppMapping’) ) lte 1){
setBaseURL(“http://#cgi.HTTP_HOST#/index.cfm”);
}
else{
setBaseURL(“http://#cgi.HTTP_HOST#/#getSetting(‘AppMapping’)#/index.cfm”);
}
route(
pattern : “/login”,
target : “main.login”
);
When I try to hit http://localhost/login , It is working fine.
AppMapping as dharcf → When I try to hit http://localhost/dharcf/login , Facing issue like ’ The event: login is not a valid registered event.’
I hope, SetbaseURL is not working. Should I need to add anything?
Could you please help me to resolve this issue?
NOTE: There is no rewrite rule added.