sorry if I ask a lot of questions lately, but I am still learning how umbraco works. I was trying to set some redirect rules today to force my whole site to https unless if it contains a specific images folder in the path and got stuck with it either not working, or ending up in redirect loops. I would like some advice on this.
I am currently trying to make one rule that fits all (following the redirect loops of using two rules :P ), but I would be happy with two, if they got the job done as well. As mentioned previously, I would like to force eveything to https unless it contains an images folder sitting just under my domain. The code I came up with is below.
https redirect with some folder exclusion
Hi everyone,
sorry if I ask a lot of questions lately, but I am still learning how umbraco works. I was trying to set some redirect rules today to force my whole site to https unless if it contains a specific images folder in the path and got stuck with it either not working, or ending up in redirect loops. I would like some advice on this.
I am currently trying to make one rule that fits all (following the redirect loops of using two rules :P ), but I would be happy with two, if they got the job done as well. As mentioned previously, I would like to force eveything to https unless it contains an images folder sitting just under my domain. The code I came up with is below.
<add name="301ReDirect_allexcept_images" redirectMode="Permanent" redirect="Domain" ignoreCase="true" rewriteUrlParameter="IncludeQueryStringForRewrite" virtualUrl="http://mydomain/(?!images)({^.]*[^/])$" destinationUrl="https://mydomain/$1" />
Would anyone have some advices on what I might be missing?
I also need to add the "www." in the event it is missing :/
is working on a reply...