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
Rewrites are getting confused from rewrite match to lucee request being executed.
Same rewrites work on Apache
With the following rule. RewriteRule ^(.*)$ index.cfm%{REQUEST_URI} [QSA,L,NS]
Hitting a url of /cbadmin is rewritten as /index.cfm/cbadmin correctly
Hitting a url of /cbadmin/foo is matched by the rules and says its rewriting as /index.cfm/cbadmin/foo
The actual request is hitting Lucee as: /cbadmin/index.cfm/cbadmin/foo
If the rewrite is set as /index.cfm it will work because if that leading slash is missing, some code somewhere is making it relative to the "folder" it thinks it's in.
This works RewriteRule ^(.*)$ /index.cfm%{REQUEST_URI} [QSA,L,NS]
But only if you aren't using a subfolder.
If you have /app/index.cfm and you hit /app/cbadmin/ it would fail if you have the rule with /index.cfm
The text was updated successfully, but these errors were encountered:
with this rule: RewriteRule ^(.*)$ index.cfm%{REQUEST_URI} [QSA,L,NS]
hitting this url - http://127.0.0.1:53575/app/monkey/lion/tiger
I see this error
[DEBUG] requested: '/app/monkey/lion/tiger'
[DEBUG] urlrewrite.UrlRewriter: processing request for /app/monkey/lion/tiger
[DEBUG] urlrewrite.RuleExecutionOutput: needs to be forwarded to index.cfm/app/monkey/lion/tiger
[DEBUG] urlrewrite.UrlRewriter: rule is last
[WARN ] responded: Status Code 404 (/app/monkey/lion/index.cfm)
if i have the trailing / like http://127.0.0.1:53575/app/monkey/lion/tiger/
then i see this error
[DEBUG] requested: '/app/monkey/lion/tiger/'
[DEBUG] urlrewrite.UrlRewriter: processing request for /app/monkey/lion/tiger/
[DEBUG] urlrewrite.RuleExecutionOutput: needs to be forwarded to index.cfm/app/monkey/lion/tiger/
[DEBUG] urlrewrite.UrlRewriter: rule is last
[WARN ] responded: Status Code 404 (/app/monkey/lion/tiger/index.cfm)
If i make the rule have a slash RewriteRule ^(.*)$ /index.cfm%{REQUEST_URI} [QSA,L,NS] then it works from the base.
[DEBUG] requested: '/app/monkey/lion/tiger/'
[DEBUG] urlrewrite.UrlRewriter: processing request for /app/monkey/lion/tiger/
[DEBUG] urlrewrite.RuleExecutionOutput: needs to be forwarded to /index.cfm/app/monkey/lion/tiger/
[DEBUG] urlrewrite.UrlRewriter: rule is last
Rewrites are getting confused from rewrite match to lucee request being executed.
Same rewrites work on Apache
With the following rule.
RewriteRule ^(.*)$ index.cfm%{REQUEST_URI} [QSA,L,NS]
Hitting a url of
/cbadmin
is rewritten as/index.cfm/cbadmin
correctlyHitting a url of
/cbadmin/foo
is matched by the rules and says its rewriting as/index.cfm/cbadmin/foo
The actual request is hitting Lucee as:
/cbadmin/index.cfm/cbadmin/foo
If the rewrite is set as /index.cfm it will work because if that leading slash is missing, some code somewhere is making it relative to the "folder" it thinks it's in.
This works
RewriteRule ^(.*)$ /index.cfm%{REQUEST_URI} [QSA,L,NS]
But only if you aren't using a subfolder.
If you have
/app/index.cfm
and you hit/app/cbadmin/
it would fail if you have the rule with/index.cfm
The text was updated successfully, but these errors were encountered: