locked
issue redirecting http to https RRS feed

  • Question

  • When I visit my custom domain without a subdomain (e.g.: example.com), I am correctly getting redirected to https.  When I enter my domain with a www at the begining it does not redirect to https.  Any ideas why this is happening?

    Here's how I have things set up...I am using an Azure Storage container to host a static website.  I created a CDN and CDN endpoint and have enabled a custom domain with https.  I have also gone into the CDN rules engine and have added the following rule to force https redirection:

    If Request Scheme - Source: origin-path/(.*) - Destination: https://%{host}/$1

    Tuesday, March 13, 2018 9:00 PM

All replies

  • Those articles unfortunately do not help as they are for Azure App Services.  I am using Azure Blob Storage with Azure CDN to host my static site.  I have the following two rules in within the CDN Rules Engine (images attached)

    Whenever I go to domain.com it redirects correctly to https://www.domain.com

    When I go to www.domain.com it redirects incorrectly to https://www.domain.com/site/index.html instead of redirecting to www.domain.com

    Here are screencaps of the rules I have set:

    Rule #1 used so that when users go to domain.com it points them to my index.html on Azure blob storage: https://imgur.com/iVLXS1B

    Rule #2 used to force redirect http to https: https://imgur.com/iGhT1Gp


    • Edited by nnnnn2 Wednesday, March 14, 2018 4:01 AM
    Wednesday, March 14, 2018 4:01 AM
  • well at least I provided you the opportunity to clarify what you needed.


    Sam Hobbs
    SimpleSamples.Info

    Wednesday, March 14, 2018 4:42 AM
  • Verizon rules are processed in order from top down, and the Destination field is used to process further requests.

    In your case, your rule #1 was rewriting the path to /site/index.html.

    The second rule sees this, and the capture group includes /site/index.html.

    If you switch the order of your rules around, you should see the behavior you expect.

    Friday, March 16, 2018 8:21 PM
  • Did you solve your problem? I have the same problem
    Thursday, September 27, 2018 6:27 PM