locked
http to https redirect with rewrite. RRS feed

  • Question

  • Hi, we are trying to redirect all http access to our website to https. It can be done by the "request scherme" rule yes we are aware but the problem is we need to rewrite our index.html location depending if it is a smartphone or not. But what happens is there is an error as shown on the photo below

    Monday, April 9, 2018 3:44 PM

All replies

  • As the error says, you cannot combine Request Scheme and URL Rewrite in the same rule.

    Can you replace URL Rewrite and use URL Redirect instead for all cases?

    Monday, April 9, 2018 11:02 PM
  • Then how will render the index.html when let's say I entered example.com? You need to rewrite to show the index.html for that right?
    Tuesday, April 10, 2018 1:06 AM
  • You can easily use a URL redirect to redirect from example.com to example.com/index.html.

    On the other hand, it appears what you are actually trying to do is redirect to https, AND IF it is mobile ALSO do a rewrite for mobile version.

    In that case, to have the mobile rule to apply ON TOP of the http -> https rule, take your bottom two ELSE IF statements and create a second rule under the first with just those two. The existing ELSE IF logic isn't the right logic to use in this case.

    Tuesday, April 10, 2018 2:54 AM
  • It did not work
    Tuesday, April 10, 2018 7:47 AM
  • I need more data from you to understand what exactly you're trying to do and to help you debug.

    Can you please email me at rli@microsoft.com with a screenshot of your latest rule configurations, and example URLs for the different rule cases?

    Tuesday, April 10, 2018 8:38 PM