https://bugs.freenas.org/issues/4095 - retain hostname on https redirection

 https://bugs.freenas.org/issues/4095 With this change, hostname will now remain intact on a redirect and a temporary (307) redirect is used instead of a permanent (301), which would now stop browsers from caching the redirection.  Permanent redirections have to be manually flushed from your browser if the https settings are changed (e.g. removed or port changed)