Open bdw429s opened 6 years ago
Hmm, maybe check this out: https://stackoverflow.com/questions/23665573/tuckey-urlrewrite-matching-and-context
Specifically the use-context
and %{context-path}
bits. The docs seem to say the context will be added automatically, but also maybe that they won't, so... ¯_(ツ)_/¯
I'll have to give that a test. If it works, perhaps Runwar can set that automatically for sites with a context. This is fairly edge case. Only 1 person I know of who's tried to use a context.
I was testing starting up a server with the default CommandBox URL rewrites and a custom context path and found it doesn't work which isn't super surprising, but I'm not sure how to fix it.
If I run these commands:
Then, these URLs work fine:
However, if I enable rewrites:
Then this URL still works:
But these URLs don't work:
The error for both of those URLs is a Lucee 404:
It's looking for a physical folder called
myContext
which doesn't exist. I see this in the debug output which implies that it's getting rewritten:So this sort of makes sense that the Rewrites aren't going to find these paths as real physical paths since the context path is in there, but I'm not clear on whether I need to adjust the rewrite rules or whether this is a bug in Runwar, or Tuckey that's not accounting for a servlet context path.