INN / umbrella-sfpublicpress

San Francisco Public Press
https://sfpublicpress.org/
GNU General Public License v2.0
1 stars 4 forks source link

Rough draft at attempting automated redirects for terms #143

Closed joshdarby closed 4 years ago

joshdarby commented 4 years ago

Changes

This pull request makes the following changes:

Why

For #97

Testing/Questions

Features that this PR affects:

Questions that need to be answered before merging:

Steps to test this PR:

  1. Attempt to go to a category/tag url that will 404, such as https://sfpp.test/category/howdyhowdyhowdy or https://sfpp.test/tag/goodbyegoodbyegoodbye
  2. Make sure the above don't actually 404 and instead redirect to /categories/
  3. Make sure a relevant redirect is created in the redirection plugin
  4. Make sure no erroneous redirects are created due to weird edge cases
  5. Make sure there are no errors thrown if the redirection plugin is disabled
benlk commented 4 years ago

should /categories/ be hardcoded or should we instead grab a specific post id and grab its permalink?

I'm fine with it being /categories/ rather than a specific post ID; this way they can change the post or set up some other redirect from /categories/ to something else.