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

Sunrise: Redirect domain to latest year site that is not deleted. #1384

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

dd32
Copy link
Member

@dd32 dd32 commented Oct 4, 2024

https://wordpress.slack.com/archives/C08M59V3P/p1728017732714399

As reported here, accessing the root-domain for kolkata is redirecting to a incorrect URL, this happens as a duplicate 2025 site was accidentally created with a space after it:

$ curl -I https://kolkata.wordcamp.org/
HTTP/1.1 302 Found
....
Location: https://kolkata.wordcamp.org/2025/%20/

After this change, it correctly references the non-deleted site:

$ curl -I https://kolkata.wordcamp.org/
HTTP/1.1 302 Found
...
Location: https://kolkata.wordcamp.org/2025/

@dd32
Copy link
Member Author

dd32 commented Oct 4, 2024

Notes

  • Some deleted sites (deleted = 1) are also public (public=1)
  • Some not-public sites are not-deleted (for example testing.wordcamp.org)
  • There's also archived, which are a mix of public=0 and deleted=1

That's why I've included both public and deleted here, which seems to cover the correct subset of sites that shouldn't be redirected to.

@dd32 dd32 merged commit 401a998 into production Oct 4, 2024
3 checks passed
@dd32 dd32 deleted the fix/redirect-to-deleted-blog branch October 4, 2024 05:26
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.

1 participant