fix(routing): prevent upgrade if .htaccess needs updating

The router relies on a querystring added via URL rewriting by
the web server. If missing, this would lead to looping redirects
or showing only the index page. This requires the URL rewriting
strategy to be in place before the upgrade can run.

Fixes #6521