I am attempting to set up an API site in ColdFusion using FW/1, using subsystems. I would like to set up the routes to omit index.cfm and use /subsystem/action/item for the default paths, but I'm not sure if there is a way to do this. The documentation isn't very clear, from what I can find and other questions out there are very old.
Right now, I have the following in my Application.cfc...
variables.framework = {
trace = false,
reloadApplicationOnEveryRequest = "true",
home = "main.default",
diComponent = "framework.ioc",
diLocations = "/model,/controllers",
SESOmitIndex = true
};
variables.framework.routes = [
{ "$GET/accounts:member/membercount" = "/account/member/membercount" }
];
This is resulting in a 404 error in IIS. Any suggestions?
UPDATE: I did find that I need to update IIS to include a URL Rewrite in order to omit the index.cfm, however, I still get a 404 when I attempt to call http://example.com/account/member/membercount
If I change the URL to http://example.com/account:member/membercount I get an IIS error, "A potentially dangerous Request.Path value was detected from the client (:)".
I would prefer to call the URL the first way, using a "/" instead of the ":" but I'm not sure how to do it. It seems like the routes should be able to handle this, but I haven't been able to find a way so far.