<?xml version="1.0" encoding="UTF-8"?>
<configuration>
	<system.webServer>
		<directoryBrowse enabled="false" />
		<staticContent>
			<remove fileExtension=".woff" />
			<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
			<remove fileExtension=".woff2" />
			<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
			<remove fileExtension=".svg" />
			<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
			<remove fileExtension=".js" />
			<mimeMap fileExtension=".js" mimeType="application/x-javascript;charset=UTF-8" />
		</staticContent>
		<rewrite>
			<rules>
				<rule name="Protect files and directories from prying eyes" stopProcessing="true">
					<match url="\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock))$" />
					<action type="CustomResponse" statusCode="403" subStatusCode="0" statusReason="Forbidden" statusDescription="Access is forbidden." />
				</rule>
				<rule name="Force simple error message for requests for non-existent favicon.ico" stopProcessing="true">
					<match url="favicon\.ico" />
					<action type="CustomResponse" statusCode="404" subStatusCode="1" statusReason="File Not Found" statusDescription="The requested file favicon.ico was not found" />
					<conditions>
						<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
					</conditions>
				</rule>
				<rule name="Elxis rule 1" stopProcessing="true">
					<match url="(.*)" ignoreCase="true" />
					<conditions logicalGrouping="MatchAny">
						<add input="{URL}" pattern="(^|/)\.htaccess$" />
						<add input="{URL}" pattern="(^|/)web\.config$" />
						<add input="{URL}" pattern="(^|/)wp\-login\.php$" />
						<add input="{URL}" pattern="(^|/)(wp\-(content|admin|includes).*)" ignoreCase="false" />
						<add input="{URL}" pattern="(^|/)(configuration|config1|config2|config3)\.php$" ignoreCase="false" />
					</conditions>
					<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
				</rule>
				<rule name="Elxis rule 2" stopProcessing="true">
					<match url="^estia/inner.php(.*)"  />
					<action type="Rewrite" url="/estia/inner.php"  />
				</rule>
				<rule name="Elxis rule 3" stopProcessing="true">
					<match url="^estia/(.*)"  />
					<action type="Rewrite" url="/estia/index.php"  />
				</rule>
				<rule name="Elxis rule 4" stopProcessing="true">
					<match url="^(.*)$" ignoreCase="false" />
					<conditions>
						<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
						<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
						<add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" />
					</conditions>
					<action type="Rewrite" url="index.php" appendQueryString="true" />
				</rule>
			</rules>
		</rewrite>
		<httpErrors>
			<remove statusCode="404" subStatusCode="-1" />
			<error statusCode="404" prefixLanguageFilePath="" path="/index.php" responseMode="ExecuteURL" />
		</httpErrors>
		<defaultDocument>
			<files>
				<remove value="index.php" />
				<add value="index.php" />
			</files>
		</defaultDocument>
	</system.webServer>
</configuration>