IIS Rewrite-http_toHttps-Add_WWW

<?xml version="1.0" ?>
<rules>
 <clear/>
 <rule name="Add_WWW" stopProcessing="true">
	<match url="^(.*)$"/>
	<conditions>
		<add input="{HTTP_HOST}" pattern="^(?!www.)(.*)$"/>
	</conditions>
	<action type="Redirect" url="http://www.{C:0}{PATH_INFO}" redirectType="Permanent"/>
 </rule>
 <rule name="http_toHttps" stopProcessing="true">
	<match url="(.*)"/>
	<conditions>
		<add input="{HTTPS}" pattern="off" ignoreCase="true"/>
	</conditions>
	<action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}"/>
 </rule>
 <rule name="My_proxy">
	<match url="^(.*)"/>
	<conditions logicalGrouping="MatchAny">
		<add input="{HTTP_HOST}" pattern="^www.yyspark.com"/>
	</conditions>
	<action type="Rewrite" url="https://nas.yyspark.com:88/{R:1}"/>
 </rule>
</rules>

Leave a Reply

Your email address will not be published. Required fields are marked *