<?xml version="1.0" encoding="UTF-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  https://go.microsoft.com/fwlink/?LinkId=301880
  -->
<configuration>
  <system.webServer>
    <rewrite>
      <rules><rule name="Main Rule" enabled="true" stopProcessing="true"><match url=".*"/><conditions logicalGrouping="MatchAll"><add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/><add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/></conditions><action type="Rewrite" url="index.php"/></rule><rule name="SSL" enabled="false" stopProcessing="true"><match url="(.*)"/><conditions><add input="{HTTPS}" pattern="^OFF$"/></conditions><action type="Redirect" url="https://www.companionsoftware.com.au/{R:1}"/></rule><rule name="Add www" enabled="false" patternSyntax="Wildcard" stopProcessing="true"><match url="*"/><conditions><add input="{HTTPS_HOST}" matchType="Pattern" pattern="www.companionsoftware.com.au" ignoreCase="true" negate="true"/></conditions><action type="Redirect" url="https://www.companionsoftware.com.au/{R:1}"/></rule>
			<rule name="WordPress: https://companionsoftware.com.au" patternSyntax="Wildcard">
				<match url="*"/>
					<conditions>
						<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
						<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
					</conditions>
				<action type="Rewrite" url="index.php"/>
			</rule></rules>
    </rewrite>
  </system.webServer>
</configuration>
