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

Add basic redirect support #560

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

stianst
Copy link
Contributor

@stianst stianst commented Jan 30, 2025

Signed-off-by: stianst [email protected]

@ahus1
Copy link
Contributor

ahus1 commented Jan 30, 2025

The concept looks good to me. I might consider inlining resources/redirects into the HTML using freemarker logic to avoid another remote request.

If we have a match, I updated the page title so that Google Analytics will record something different than the page title "page not found", as we use that in our report. See stianst#1 for a PR. Inlining would still make sure that this update doesn't happen too late.

Instead of startWith() I would instead prefer a RegEx as we would soon use wildcards for version placeholders (redirecting to the latest version if a earlier patch release was removed), or having a wildcard for with and without .html.
If you think this could be handled in a follow-up PR, feel free to merge this one.

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 this pull request may close these issues.

2 participants