@powertoaster There are two things necessary for fully-rewritten SES URLs to work in a subdirectory
Framework rewrites in place that account for the sub folder
A double wildcard *.cfm/* servlet mapping
The default ColdBox rewrites are ONLY to work for an app in the web root, so instead of having a rule that rewrites
you need a rule that rewrites
That will take care of the first bullet, but the second bullet depends on whether you’re using Lucee or ACF and how they are configured. Adobe CF and CommandBox will always support SES URLs in sub folders because they are magic. A default Lucee installation is constrained by Tomcat, and will likely require you to add a servlet mapping of
for any subdirectories where you want SES URLs to work.
In order to simplify this, tackle the second bullet first and get this URL working
which does not require the rewrite. Once that is verified, modify and test your new rewrite rule against
I still don’t understand why the router did not kick in. Because it should have. The only thing that might have prevented that would be tuckey @bdw429s where it detected it as a directory and tried to do directory browsing on it. Because in reality, I would have expected route( "/blah", "handler.action" ) to work.
Minor update: I went back through all of my code and the comments that I posted originally.
The flaw was in the original router code:
I used route( “/blah”, “blah.login.index” ).end(); instead of route( “/blah”, “blah/login.index” ).end();
One thing to note. The route() method has the pattern and the target arguments. If you pass the target argument, that will terminate the route for you. Calling .end() on it, virtually does nothing for you. So you can clean it up if you need to.