mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-27 06:29:19 +08:00
48 lines
2.0 KiB
Plaintext
48 lines
2.0 KiB
Plaintext
<configuration>
|
|
<system.webServer>
|
|
<defaultDocument>
|
|
<files>
|
|
<clear />
|
|
<add value="index.php" />
|
|
<add value="index.html" />
|
|
</files>
|
|
</defaultDocument>
|
|
<!-- Fix webfont issue on IIS -->
|
|
<staticContent>
|
|
<mimeMap fileExtension="." mimeType="image/png" />
|
|
<remove fileExtension=".woff"/>
|
|
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
|
|
<remove fileExtension=".woff2"/>
|
|
<mimeMap fileExtension=".woff2" mimeType="application/x-font-woff2" />
|
|
</staticContent>
|
|
<!-- For rewrite to work please install IIS URL Rewrite Module -->
|
|
<rewrite>
|
|
<rules>
|
|
<rule name="Block access to dotfiles">
|
|
<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>
|
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" 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>
|
|
<action type="Rewrite" url="index.php" />
|
|
</rule>
|
|
</rules>
|
|
</rewrite>
|
|
</system.webServer>
|
|
</configuration>
|