soutsjjw
3/8/2019 - 8:12 AM

URL Rewrite - 網站強制轉 https

<rewrite>
		<rule name="網站強制轉 https" stopProcessing="true">
			<match url="(.*)" />
			<conditions>
				<add input="{URL}" pattern="\.asmx$" negate="true" />
				<add input="{URL}" pattern="green-life\/file\/" negate="true" />
				<add input="{URL}" pattern="downtime\.aspx*" negate="true" />
				<add input="{URL}" pattern="backstageonehour\.aspx*" negate="true" />
				<add input="{URL}" pattern="backstage\.aspx*" negate="true" />
				<add input="{HTTPS}" pattern="^OFF$" />								
			</conditions>
			<action type="Redirect" url="https://{HTTP_HOST}/google.com/{R:1}" redirectType="Permanent" />
		</rule>
	</rules>
</rewrite>