Skip to content

Instantly share code, notes, and snippets.

@macna
macna / SilverStripe-Azure-Web.config
Last active February 23, 2016 17:32
An example web.config file for hosting the SilverStripe CMS in Microsoft Azure Websites.
<configuration>
<system.webServer>
<security>
<requestFiltering>
<hiddenSegments>
<add segment="silverstripe-cache" />
<add segment="vendor" />
<add segment="composer.json" />
<add segment="composer.lock" />
</hiddenSegments>
@macna
macna / IIS-HTTPS-Redirect-Web.config
Created April 18, 2015 21:11
A snippet from a Microsoft Internet Information services web.config file that enables HTTP requests to be redirected to HTTPS. Requires that the rewrite module is installed.
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
</rule>