Closed GeoffFroh closed 2 weeks ago
The Django way of handling this is to set APPEND_SLASH = True
. This will cause URLs without a trailing slash to redirect to the same URL with a slash appended. Either URL will work, at the cost of lots of redirects. This should be enabled by default...
Fixed in encyc-front
develop
branch commit faefa29
.
Django has that APPEND_SLASH
thing but our requirement that article pages work without the trailing slash kindof broke that.
Mitigations included replacing all internal links with Django {% url ... %}
tag links (so all links include trailing slashes) and adding some code to the article
view so that "static" pages like /about
and /history
pages without slashes (i.e. links from off-site) still work.
Urls for the site should not require a trailing slash.
For example,
https://encyclopedia.densho.org/about
currently returns a 404.