Forum Discussion
Arie
Aug 13, 2015Altostratus
If you always want to redirect from HTTP to HTTPS I would recommend using a 301 (permanent redirect) as opposed to the 302 (temporary redirect) that is generated by
HTTP::redirect
. A permanent redirect is cached by clients so it saves on HTTP-requests.
You accomplish this by replacing
HTTP::redirect "https://www.sharepointsite.com[HTTP::uri]"
with HTTP::respond 301 Location "https://www.sharepointsite.com[HTTP::uri]"
.
You can further optimize by using HSTS, which instructs clients to use HTTPS for subsequent requests even if the link specifies HTTP.