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

rewrite with query string carry over #43

Open
IIM-Andreas opened this issue Jul 13, 2023 · 2 comments
Open

rewrite with query string carry over #43

IIM-Andreas opened this issue Jul 13, 2023 · 2 comments
Labels

Comments

@IIM-Andreas
Copy link

Hi,

maybe I doing it wrong or there's a Bug.
I'm using COntao 4.13.

I wanna do a rewrite like this
domain.tld/news/123?bli=1&bla=2 → domain.tld/news-reader/456?bli=1&bla=2

My settings:

Type: basic
Hosts restriction: domain.tld
Path restriction: /news/123{wildcard}
Requirements: [wildcard => .*]
Response code: 301 Moved Permanently
Response redirect URL: https://domain.tld/news-reader/456{wildcard}

Result:
The rewrite works but the query strings are gone.
https://domain.tld/news-reader/456

@Toflar
Copy link
Member

Toflar commented Jul 13, 2023

As far as I know there is no option of keeping all query parameters as is. That's not possible imho.

@leofeyer
Copy link

leofeyer commented Nov 5, 2024

There is a keepQueryParams option that has been added in Symfony 4.1: symfony/symfony#26281

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

No branches or pull requests

3 participants