rewriteRule when relative is malfunctioning when depth greater than 1

Description

Original runwar issue #118

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

Status

Assignee

Miguel Mathus

Reporter

Miguel Mathus

Labels

None

Components

Fix versions

Priority

Major
Configure