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

QSA in RewriteRule only works if there is already a query string in the destination URL #31

Open
alexandrucancescu opened this issue May 26, 2023 · 1 comment

Comments

@alexandrucancescu
Copy link

alexandrucancescu commented May 26, 2023

local new_qs = dst:match('%?.*')

RewriteRule p/ajax /ajax.php [QSA,L]

Will not work because the script will never append the querystring as it will not get past if new_qs then. So the querystring will be lost.

I need to append a random string to the destination path in order for QSA to work:

RewriteRule p/ajax /ajax.php?x=1 [QSA,L]

This works and passes the incoming querystring to the rewrite url.

@rkaiser0324
Copy link
Contributor

This is a duplicate of #27 which is fixed in P - so you can use that commit.

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

2 participants