Browse Source

Add IIS config for easier windows setup (#66)

* Add IIS config for easier windows setup

* Use regex from .nginx.conf and comment out rule

Uses the more common regex which reduces the number of rules and also commented out for consistency with nginx and apache

* Used enabled flag for no-public restrictions

Also fixes any indentations
pull/67/head
Matt Kilgore 4 years ago committed by GitHub
parent
commit
4ffaf91ec4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 29
      public/web.config

29
public/web.config

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="Index.php" />
</files>
</defaultDocument>
<rewrite>
<rules>
<!-- Changed `enabled=` to true in the rule below if you are not using the `public` directory to
prevent sensitve resources from being exposed -->
<rule name="Disallow sensitive directories" enabled="false" stopProcessing="true">
<match url="^/(\.git|composer\.(json|lock)|auth\.json|config\.php|flarum|storage|vendor)" ignoreCase="false" />
<action type="CustomResponse" url="/" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
<rule name="Handle index.php re-write" stopProcessing="true">
<match url="^" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Loading…
Cancel
Save