locked
Enforcing SSL and www with custom rules on CDN RRS feed

  • Question

  • I would like to do a 301 redirect for any non-www and any non https to https://www.inboxlock.com/ with the URL afterwords.

    For the SSL:

    I see there's a "Request Scheme" i may be able to use to redirect to SSL. However I can't find an option to redirect with a 301 to SSL after matching it with "http"?

    For the www:

    Maybe match it with the "Referring Domain"? I'm stuck on this one.

    Thanks, Chris Walters

    Wednesday, May 3, 2017 8:21 AM

All replies

  • Hey Chris,

    Are you using Verizon Premium profile? Are both the www and non-www subdomains added as custom domains to the CDN endpoint?

    In that case you can use 2 URL redirection rules to redirect non-www, and non-https requests to your domain.

    See more: https://docs.microsoft.com/en-us/azure/cdn/cdn-rules-engine-reference-features#url-redirect

    You will want something like the following:

    Rule 1:

      match condition:

        if Request Scheme = HTTP

      feature:

        Redirect - Code: 301, source: (.*), destination: https://www.inboxlock.com/$1

    Rule 2:

      match condition:

        if Edge Cname = <any non-www custom domains>

      feature:

        Redirect - Code: 301, source: (.*), destination: https://www.inboxlock.com/$1


    Wednesday, May 3, 2017 6:41 PM