Page MenuHomePhabricator

When users visit a Phame post URI with an old blog ID, canonicalize the URI instead of 404'ing
ClosedPublic

Authored by epriestley on Jul 31 2019, 6:40 PM.
Tags
None
Referenced Files
F15403081: D20688.id49341.diff
Tue, Mar 18, 1:50 AM
F15352950: D20688.diff
Mon, Mar 10, 7:10 PM
F15339049: D20688.diff
Sun, Mar 9, 2:09 PM
Unknown Object (File)
Mon, Mar 3, 4:20 PM
Unknown Object (File)
Mon, Feb 24, 6:44 AM
Unknown Object (File)
Mon, Feb 24, 12:12 AM
Unknown Object (File)
Sat, Feb 22, 4:36 PM
Unknown Object (File)
Fri, Feb 21, 9:39 PM
Subscribers
None
Tokens
"Orange Medal" token, awarded by Krinkle.

Details

Summary

Fixes T13353. If you:

  • Visit a blog post and save the URI.
  • Move the blog post to a different blog.
  • Revisit the old URI.

...we currently 404. We know what you're trying to do and should just redirect you to the new URI instead. We already do this if you visit a URI with a noncanonical slug.

Test Plan
  • Created post A.
  • Copied the live URI.
  • Moved it to a different blog.
  • Visited the saved URI from the earlier step.
  • Before: 404.
  • After: Redirect to the canonical URI.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable