Open dchiller opened 11 months ago
And 301
indicates a permanent redirect, correct?
We should be a bit careful - in something relating to DataLake earlier today, we were talking about renaming, say, /sources
to /source
. We've already switched /genre
to redirect to /genres
, so we should be careful not to swap things back and forth.
Redirects that should be permanent, I think:
sites/default/files/csv/<str:source_id>.csv
-> source/<str:source_id>/csv/
node/<int:pk>
-> source, chant, sequence, etc. detail pageindexer/<int:pk>
-> the relevant user pagesites/default/files/documents/1. Quick Guide to Liturgy.pdf
, sites/default/files/documents/2. Volpiano Protocols.pdf
, ..., sites/default/files/HOW TO - manuscript descriptions-Nov6-20.pdf
-> the relevant static filessome which we may not be certain about:
/genre
-> /genres
(but maybe this one is properly permanent?)/office
-> /offices
(ditto)/feasts
has always been /feasts
...)And
301
indicates a permanent redirect, correct?
Yes
Looks like this will be trivial to implement once we're very confident of our list of permanent redirects. return redirect(reverse("csv-export", args=[source_id]))
becomes return redirect(reverse("csv-export", args=[source_id]), permanent=True)
Going to make an executive decision and say we're currently happy with all of our redirects, and that we should communicate that they are permanent. This will just require someone going through all the redirects
in our views and adding a permanent=True
kwarg.
In my excavations of the CantusDB logs, I discovered that responses to some requests that I think are permanent redirect are actually returning
302
responses.In particular,
/node/<id>
and/office
return302
's rather than301
's. My understanding is that both of these redirects are permanent for the purpose of harmonizing Old and NewCantus URLs.