Skip to content

Instantly share code, notes, and snippets.

Last active December 18, 2015 09:59
What would you like to do?
web.config for question2answer
<?xml version="1.0"?>
<rule name="DeduplicateSlashes" stopProcessing="true">
<match url="." ignoreCase="false" />
<add input="{URL}" pattern="^(.*)//(.*)$" ignoreCase="false" />
<action type="Redirect" redirectType="Permanent" url="{C:1}/{C:2}" />
<rule name="CleanRouting" stopProcessing="true">
<match url="^.*$" ignoreCase="false" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
<action type="Rewrite" url="index.php?qa-rewrite={R:0}&amp;{QUERY_STRING}" appendQueryString="false" />
<!-- Double escaping is needed for URLs with '+', e.g. for the account page for a username with a space. -->
<requestFiltering allowDoubleEscaping="true" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment