silverstripe-framework/templates/SilverStripe/Assets/Flysystem/PublicAssetAdapter_WebConfig.ss

30 lines
1.1 KiB
Scheme
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<!--
Configuration to whitelist appropriate asset files, for IIS.
This file is automatically generated via File.allowed_extensions configuration
-->
<configuration>
<system.webServer>
<security>
<requestFiltering>
<fileExtensions allowUnlisted="false" applyToWebDAV="true">
<% loop $AllowedExtensions %>
<add fileExtension=".{$Extension}" allowed="true" />
<% end_loop %>
</fileExtensions>
</requestFiltering>
</security>
<rewrite>
<rules>
<rule name="Secure and 404 File rewrite" stopProcessing="true">
<match url="^(.*)$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="../framework/main.php?url={R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>