Hey Vince,
I recently moved one of our websites to HTTPS centric.
The technical process of this was very simple by adding this code to the web.config file:
<rule name="Redirect to https" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" />
</rule>
I, however, had to fight for a LONG time to sort out why our proddetail pages were 301 chaining 2 redirects together. As I'm sure you know, a single 301 redirect is ideal for SEO purposes. 2 is not.
As it turns out, the getfullurl function in incfunctions.asp was thoughtfully choosing between http and https
getfullurl="http"&IIfVs(request.servervariables("HTTPS")="on","s")&"://"&request.servervariables("HTTP_HOST")
Unfortunately, that means that when a user requested a non https querystring'd proddetail.asp page - I got 1 redirect to the http SEO friendly URL version and that was followed up by a second redirect to the https version.
Example:
http://www.prothanesuspensionparts.com/proddetail.asp?prod=8304--->
http://www.prothanesuspensionparts.com/8304--->
https://www.prothanesuspensionparts.com/8304In order to fix this, I had to change the code:
getfullurl="https://"&request.servervariables("HTTP_HOST")
and update my web.config to ignore proddetail pages:
<rule name="Redirect to https" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
<add input="{URL}" pattern="proddetail" negate="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" />
</rule>
I wonder if it might be a good idea to incorporate sitewide HTTPS options so that things like this would instead force HTTPS regardless of which querystring was originally requested.
We already know that Google is giving a small rankings bump to HTTPS sites!
Further, in moving the site to HTTPS centric I had to update all the images and content to find any "http:" and replace with "https:" - it wouldn't be hard to create a tool to accomplish this with a single click and perhaps even as an add on tool that would allow for people to run the tool regularly in the future just incase something got coded in http by accident going forward.
- Graham Slaughter