Fix hard-coded URL patterns in the templates
That is, replace
<a href="/contlist/">Containers</a>
with
<a href="{{ url_for('contlist') }}">Containers</a>
You get the idea, don't you? :slightly_smiling_face:
Hard-coded URL can be removed only from the HTML5 templates and those generated from JavaScript would still be hard-coded as they cannot be used with the templating engine unless the JavaScript files are made into one of the origin templates, like frameset.html but then the rendered HTML would also include internal JavaScript code in themselves and not import it externally - which is not we want.
This issue can hence be fixed either partially or we can look away from fixing this at all for the redirects work perfectly in the current state and a mixture of soft-coded URLs (in HTML files) and hard-coded URLs (in JavaScript files), albeit working, would still lead to an inconsistent code and any change to the URL pattern would still not be reflected automatically in the imported JavaScript files.
Tagging this issue with the question label now.