Skip to content
New issue

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

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

Already on GitHub? # to your account

FR: Maintain query strings on exact match patterns #180

Closed
stuartcusackie opened this issue Jun 6, 2024 · 3 comments
Closed

FR: Maintain query strings on exact match patterns #180

stuartcusackie opened this issue Jun 6, 2024 · 3 comments

Comments

@stuartcusackie
Copy link

We ran into a bit of trouble today on a project that needs to maintain query strings for marketing campaigns. I opened an issue about it earlier.

I'm wondering if we can maintain query strings by default on exact match rules, or even to have a checkbox to choose. As it stands, this project will have to use regex patterns for all of its redirects and this will lead to confusion in the future.

Thanks!

@digilist
Copy link

@riasvdv thank you for implementing this feature! I noticed two issues:

  1. The config is read via config('redirect.preserve_query_strings') and not config('statamic.redirect.preserve_query_strings'), so that it needs a separate configuration file.
  2. If the redirect destination already defines a query string, it can result in URLs like this /example?foo=bar?foo=bar. I think it would be better to merge these.

It would be great if you can look into this 😊

@riasvdv
Copy link
Owner

riasvdv commented Nov 19, 2024

  1. Oops! That was definitely a typo, fixed in the latest release 👍
  2. Can you make a separate issue for this? Then I'll try to take a look at it soon

@digilist
Copy link

Thank you for the quick fix! I've opened #192 for the second issue.

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

No branches or pull requests

3 participants