Site upgrade without .htaccess redirects

Reduces the root index.php to a minimal script that should remain
unchanged.

Moves recording of site state to the config file so that the above
minimal index.php can redirect without using ZP code that might be under
change.