feat: redirect /sign-up to /signup#60468
Merged
Merged
Conversation
Adds a permanent (301) redirect from `/sign-up` (and `/sign-up/`) to the canonical `/signup` route, preserving any query string. The redirect is path-based so it works on every subdomain (app., us., eu.) without per-host configuration. Generated-By: PostHog Code Task-Id: 7e045c05-2e33-43c2-9dd1-fa2a1c36661a
Contributor
|
Reviews (1): Last reviewed commit: "Merge branch 'master' into posthog-code/..." | Re-trigger Greptile |
Contributor
|
This one is a bit out of my area of expertise I think as we're messing with the router for the entire app which I'd be scared to break 😅 |
rafaeelaudibert
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Users (and external links) occasionally hit
/sign-upinstead of the canonical/signup. Today that path falls through to the catch-all and forces a login, instead of landing on the signup page.Changes
posthog/urls.pythat redirects/sign-up(with or without trailing slash) to/signup, preserving the query string via Django'sRedirectView(query_string=True).app.,us.,eu.) without per-host configuration — the host is preserved by the relative redirect.How did you test this code?
I'm an agent. I added parameterized automated tests in
posthog/test/test_urls.pycovering both slash variants and with/without query strings, asserting a301and the correctLocationheader. I could not execute the test suite in the sandboxed environment (nohogli/flox/uv/Django installed), so CI will need to confirm the run.Publish to changelog?
do not publish to changelog
Docs update
No docs change needed.
🤖 Agent context
RedirectViewwithpermanent=True, query_string=Trueso that signup links carrying?email=…or campaign parameters survive the hop.Created with PostHog Code