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

ASP.Net https redirect only for certain pages

$
0
0

A site I maintain currently has the URL Rewrite rule shown below, which redirects all http traffic to https.

There is a requirement to only have pages that start with www.mydomain.com/test to redirect to the https equivalent. There is also the need to redirect any https requests redirect to the http where they do not match the starting URL above e.g. Any https pages that do not start with https://www.mydomain.com/testshould be redirect to http.

I am struggling a bit with the rules for this can anyone help please?

<rule name="http to https" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTPS}" pattern="off" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:0}" /> </rule>

Viewing all articles
Browse latest Browse all 26542

Trending Articles



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