Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
proginter opened this issue Jan 3, 2023 · 0 comments
Open

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

proginter opened this issue Jan 3, 2023 · 0 comments

Comments

@proginter
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant