FIX Add redirects to `public/` for iis (#263)

FIX Add redirects to `public/` for iis
This commit is contained in:
Manuel Thalmann 2020-09-21 23:31:34 +02:00 committed by GitHub
parent 65b2a72843
commit 6035ccd689
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 0 deletions

23
web.config Normal file
View File

@ -0,0 +1,23 @@
<!-- Routing configuration for Microsoft IIS web server -->
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="SilverStripe Global URLs">
<match url="^(.*)$" />
<conditions>
<add input="{R:1}" matchType="Pattern" pattern="public(/|$)" negate="true" />
</conditions>
<action type="Rewrite" url="public/{R:1}" appendQueryString="true" />
</rule>
<rule name="SilverStripe Preprocessed URLs" stopProcessing="true">
<match url="^(.*)$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="public/index.php" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>