Skip to content

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

@alexandrucancescu

Description

@alexandrucancescu

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.

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