Skip to content

Wrong RewriteRul when have more .htaccess file in subdirectory #25

@proginter

Description

@proginter

Hi,

I have .htaccess file on root path with this content:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

I have more .htaccess file in 'root path'/style/both/addons/minify with this content:

RewriteEngine on
# rewrite URLs like "/min/f=..." to "/min/?f=..."
RewriteRule ^([bfg]=.*) index.php?$1 [L,NE]

When I go to:
https://XXX.com/style/both/addons/minify/b=style/both/js&f=json.js,jquery.js,jqbrowser.js,jquery.numeric.js,jquery.form.min.js,jquery.actual.min.js,jquery.throttle.js&nocache=true

The issue is the "ngx.exec(dst)" will execute to wrong url:
/index.php?url=style/both/addons/minify/b=style/both/js&f=json.js,jquery.js,jqbrowser.js,jquery.numeric.js,jquery.form.min.js,jquery.actual.min.js,jquery.throttle.js&nocache=true

It should execute this:
/style/both/addons/minify/index.php?b=style/both/js&f=json.js,jquery.js,jqbrowser.js,jquery.numeric.js,jquery.form.min.js,jquery.actual.min.js,jquery.throttle.js&nocache=true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions