Update web.config
This commit is contained in:
parent
a237037ade
commit
0c1537446f
43
web.config
43
web.config
|
|
@ -1,6 +1,13 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<system.webServer>
|
<system.webServer>
|
||||||
|
<defaultDocument>
|
||||||
|
<files>
|
||||||
|
<clear />
|
||||||
|
<add value="index.php" />
|
||||||
|
<add value="index.html" />
|
||||||
|
</files>
|
||||||
|
</defaultDocument>
|
||||||
|
<!-- Fix webfont issue on IIS -->
|
||||||
<staticContent>
|
<staticContent>
|
||||||
<mimeMap fileExtension="." mimeType="image/png" />
|
<mimeMap fileExtension="." mimeType="image/png" />
|
||||||
<remove fileExtension=".woff"/>
|
<remove fileExtension=".woff"/>
|
||||||
|
|
@ -8,27 +15,33 @@
|
||||||
<remove fileExtension=".woff2"/>
|
<remove fileExtension=".woff2"/>
|
||||||
<mimeMap fileExtension=".woff2" mimeType="application/x-font-woff2" />
|
<mimeMap fileExtension=".woff2" mimeType="application/x-font-woff2" />
|
||||||
</staticContent>
|
</staticContent>
|
||||||
<!-- For rewrite to work install URL Rewrite Module via Web Platform Installer -->
|
<!-- For rewrite to work please install IIS URL Rewrite Module -->
|
||||||
<rewrite>
|
<rewrite>
|
||||||
<rules>
|
<rules>
|
||||||
<rule name="bss" patternSyntax="Wildcard">
|
<rule name="Block access to dotfiles">
|
||||||
<match url="*" />
|
<match url="(^\.|/\.)" ignoreCase="false" />
|
||||||
|
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" />
|
||||||
|
</rule>
|
||||||
|
<rule name="Block access to storage path">
|
||||||
|
<match url="^storage/.*" ignoreCase="false" />
|
||||||
|
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" />
|
||||||
|
</rule>
|
||||||
|
<rule name="Redirect trailing slashes if not a folder" stopProcessing="true">
|
||||||
|
<match url="^(.*)/$" ignoreCase="false" />
|
||||||
<conditions>
|
<conditions>
|
||||||
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
|
||||||
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
|
</conditions>
|
||||||
|
<action type="Redirect" redirectType="Permanent" url="/{R:1}" />
|
||||||
|
</rule>
|
||||||
|
<rule name="Handle front controller" stopProcessing="true">
|
||||||
|
<match url="^" ignoreCase="false" />
|
||||||
|
<conditions>
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
|
||||||
</conditions>
|
</conditions>
|
||||||
<action type="Rewrite" url="index.php" />
|
<action type="Rewrite" url="index.php" />
|
||||||
</rule>
|
</rule>
|
||||||
</rules>
|
</rules>
|
||||||
</rewrite>
|
</rewrite>
|
||||||
</system.webServer>
|
</system.webServer>
|
||||||
|
|
||||||
<!-- Protect .env file -->
|
|
||||||
<location path="~/.env">
|
|
||||||
<system.web>
|
|
||||||
<authorization>
|
|
||||||
<deny users="*"/>
|
|
||||||
</authorization>
|
|
||||||
</system.web>
|
|
||||||
</location>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user