Update settings.php

Added headerOnHomeOnly setting and added direct access safeguard