You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
echo "test" > index.cfm
touch includes/test.txt
touch Application.cfm
server set runwar.args="--context-path=/myContext"
start
Page /myContext/index.cfm [C:\sandbox\contexttest\myContext\index.cfm] not found
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:
[DEBUG] urlrewrite.RuleExecutionOutput: needs to be forwarded to /index.cfm/index.cfm
and
[DEBUG] urlrewrite.RuleExecutionOutput: needs to be forwarded to /index.cfm/includes/test.txt
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: