Draft: Use full regex for free trial redirect to fix review apps
Why is this change being made?
This MR might fix gitlab-com/marketing/digital-experience/buyer-experience#744 (comment 955200088) by using the more complex regular expression matching on the free trial redirects. It needs to meet the following criteria:
- /free-trial/index.html should redirect to /free-trial/
- /free-trial/index.html/ should redirect to /free-trial/
- /free-trial/index.html?return_to=https%3A%2F%2Fgitlab.example.org should redirect to /free-trial/?return_to=https%3A%2F%2Fgitlab.example.org
- /free-trial/index.html/?return_to=https%3A%2F%2Fgitlab.example.org should redirect to /free-trial/?return_to=https%3A%2F%2Fgitlab.example.org
- /free-trial should continue to redirect to /free-trial/
- The JS should load correctly on all of the redirected targets (it wasn't for 3 and 4 in a previous iteration, until we used the literal regex to match.
- Review apps and production should work precisely the same.
I am going to verify this by following the testing workflow and see if things work out. Fingers crossed!
Author Checklist
-
Provided a concise title for this Merge Request (MR) -
Added a description to this MR explaining the reasons for the proposed change, per say why, not just what - Copy/paste the Slack conversation to document it for later, or upload screenshots. Verify that no confidential data is added.
-
Assign reviewers for this MR to the correct Directly Responsible Individual/s (DRI) - If the DRI for the page/s being updated isn’t immediately clear, then assign it to one of the people listed in the
Maintained by
section on the page being edited - If your manager does not have merge rights, please ask someone to merge it AFTER it has been approved by your manager in #mr-buddies
- If the DRI for the page/s being updated isn’t immediately clear, then assign it to one of the people listed in the
-
If the changes affect team members, or warrant an announcement in another way, please consider posting an update in #whats-happening-at-gitlab linking to this MR - If this is a change that directly impacts the majority of global team members, it should be a candidate for #company-fyi. Please work with internal communications and check the handbook for examples.
Edited by Tyler Williams