Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Alex 30 posts 120 karma points
    Feb 23, 2015 @ 06:28
    Alex
    0

    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?

  • Alex 30 posts 120 karma points
    Feb 23, 2015 @ 07:36
    Alex
    0

    I also need to add the "www." in the event it is missing :/

Please Sign in or register to post replies

Write your reply to:

Draft