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

Preserve URL parameters #173

Closed
robindevitt opened this issue Jan 11, 2022 · 4 comments · Fixed by #178
Closed

Preserve URL parameters #173

robindevitt opened this issue Jan 11, 2022 · 4 comments · Fixed by #178

Comments

@robindevitt
Copy link
Contributor

robindevitt commented Jan 11, 2022

Issue

Currently the HM Redirects plugin doesn't support URL's with parameters. So when setting up a redirect, the user can only set old-url to redirect to new-url.

So when the complete url https://dev.altis.dev/old-url/?utm_content=search contains a parameter it won't redirect accordingly and it will cause a 404 error.

Accepted Criteria

Ensure that when a url contains a parameter, that the parameters are preserved in the redirect.
EG: https://dev.altis.dev/old-url/?utm_content=search redirects to https://dev.altis.dev/new-url/?utm_content=search

GitHub

Current Issue humanmade/hm-redirects#33
Pull request humanmade/hm-redirects#55

@ghost ghost assigned robindevitt Jan 11, 2022
@roborourke roborourke transferred this issue from humanmade/altis Jan 11, 2022
@robindevitt
Copy link
Contributor Author

Task has been posted for a review in slack.

@joehoyle
Copy link
Member

Just to note we have this as an ongoing with a large customer. The primary issue is that redirects don't work when a URL param is added (not to the redirect its self).

roborourke added a commit that referenced this issue Jan 21, 2022
This update fixes #173, a bug where query string parameters were not preserved when redirecting. Further to the problem the query string was also used to match the redirect in the database which meant redirects were not happening when for example UTM parameters were present.
hm-backport bot pushed a commit that referenced this issue Jan 21, 2022
This update fixes #173, a bug where query string parameters were not preserved when redirecting. Further to the problem the query string was also used to match the redirect in the database which meant redirects were not happening when for example UTM parameters were present.
@roborourke
Copy link
Contributor

You should be able to update to the latest patch version now @joehoyle

@robindevitt
Copy link
Contributor Author

Referencing the slack thread that is relevant to this issue: https://hmn.slack.com/archives/C3CKS8LLR/p1642672742223700

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

Successfully merging a pull request may close this issue.

3 participants