Redirect to HTTPS unless localhost