Forum

URL toolkit redirect all pages to https but leave some in http

Luis Flores
6 September 2014, 18:55
Hi,

We would like to redirect our website from http to https using url toolkit. But we have an issue with two specific urls in our system used by a third party service to POST some data. This service has not implemented SSL so we could not redirect these request to the https version.

So we need to redirect 301 to https version all the site but 2 specific paths, let say: http://www.oursite.com/specific/path1 and http://www.oursite.com/specific/path2

Thanks in advance,
Luis
Hugo Leisink
6 September 2014, 19:00
Must be something like
UrlToolkit {
ToolkitID = enforce_ssl
UseSSL Return
Match ^/(specific/path1|specific/path2)$ Return
Match ^/(.*)\?(.*) Redirect https://www.oursite.com/$1?$2
Match ^/(.*) Redirect https://www.oursite.com/$1
}
Luis Flores
6 September 2014, 19:03
THANKS!!!!! great support!
Luis Flores
7 September 2014, 00:18
Just another question.What if one of the paths has a variable part, i.e.:

specific/path1/xxxxxx (xxx a number)

Thanks again!!!
Hugo Leisink
7 September 2014, 00:35
Use something like
Match ^/specific/path1/[0-9]*$ Return
Luis Flores
12 September 2014, 11:46
Hi Hugo,

Is it possible to replace with any variable -www.oursite.com-: i.e. something from the request URL? So we will not need to create a toolikt for each virtual domain that will have ssl.

Thanks,
Luis
Hugo Leisink
12 September 2014, 12:33
Sorry, that is not possible.
This topic has been closed.