JS window redir incase headers already sent

This file includes settings.php which puts out a couple of JS vars, so
headers already sent and as a result, this page dies and goes nowhere.
JS window.location setup as a failsafe to do the same in that event.