Last active
February 23, 2016 17:32
-
-
Save macna/dab4bfab38a3766ee124 to your computer and use it in GitHub Desktop.
An example web.config file for hosting the SilverStripe CMS in Microsoft Azure Websites.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<system.webServer> | |
<security> | |
<requestFiltering> | |
<hiddenSegments> | |
<add segment="silverstripe-cache" /> | |
<add segment="vendor" /> | |
<add segment="composer.json" /> | |
<add segment="composer.lock" /> | |
</hiddenSegments> | |
<fileExtensions allowUnlisted="true"> | |
<add fileExtension=".ss" allowed="false" /> | |
<add fileExtension=".yml" allowed="false" /> | |
</fileExtensions> | |
</requestFiltering> | |
</security> | |
<rewrite> | |
<rules> | |
<rule name="SilverStripe Clean URLs" stopProcessing="true"> | |
<match url="^(.*)$" /> | |
<conditions> | |
<add input="{URL}" pattern="^(.*)$" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
<add input="{URL}" pattern="\.php$" negate="true" /> | |
</conditions> | |
<action type="Rewrite" url="framework/main.php?url={R:1}" appendQueryString="true" /> | |
</rule> | |
</rules> | |
</rewrite> | |
<staticContent> | |
<remove fileExtension=".woff" /> | |
<mimeMap fileExtension=".woff" mimeType="application/font-woff" /> | |
</staticContent> | |
<handlers> | |
<remove name="PHP54_via_FastCGI" /> | |
<add name="PHP54_via_FastCGI" path="*.php" verb="GET, PUT, POST, DELETE, HEAD, OPTIONS, TRACE, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK" modules="FastCgiModule" scriptProcessor="D:\Program Files (x86)\PHP\v5.4\php-cgi.exe" resourceType="Either" requireAccess="Script" /> | |
</handlers> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment