Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

Redirect http to https using non-standard port

$
0
0

Hi

I need to redirect a website using a non-standard SSL Port.

The standard port (443) is used by another website on the same server

I need to redirect http://char-rb-test01-anonymous to https://char-rb-test01:441

I've tried a multitude of URL rewrite methods, and I'm probably only a tiny bit away from getting it right, but cannot seem to fathom it out.

My existing rule is configured thus:-

      <rules>
        <rule name="HTTP to HTTPS redirect" stopProcessing="true">
          <match url="http://char-rb-test01-anonymous" /> <!-- Require SSL must be OFF in the site settings -->
          <conditions>
                        <add input="{HTTPS}" pattern="off" />
          </conditions>
          <action type="Redirect" url="https://char-rb-test01:441" appendQueryString="false" redirectType="Found" />
        </rule>
      </rules>

But whilst the https site is working if I type in the https URL, the http site does not redirect.  SSL is Off.

I've also tried a variation of

               <rule name="HTTP to HTTPS on different SSL Port" enabled="true" stopProcessing="true">
                    <match url="(.*)" ignoreCase="true" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="true">
                        <add input="{HTTPS}" pattern="off" />
                        <add input="{HTTP_HOST}" pattern="([^/:]*?):[^/]*?" />
                    </conditions>
                    <action type="Redirect" url="https://{C:1}:441/{R:0}" appendQueryString="false" />
                </rule>

But this fails also

Please help

Thanks


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>