Commit 86076605 authored by Dries's avatar Dries

- Patch #567072 by Heine: improvements to the IIS 7 configuration file.

parent c9f03cdd
......@@ -3,41 +3,89 @@
<!-- Don't show directory listings for URLs which map to a directory. -->
<directoryBrowse enabled="false" />
Caching configuration was not delegated by default. Some hosters may not
delegate the caching configuration to site owners by default and that
may cause errors when users install. Uncomment this if you want to and
are allowed to enable caching.
<add extension=".php" policy="DisableCache" kernelCachePolicy="DisableCache" />
<add extension=".html" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="14:00:00" />
<rule name="Protect files and directories from prying eyes" stopProcessing="true">
<match url="\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$" />
<match url="\.(engine|inc|info|install|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$" />
<action type="CustomResponse" statusCode="403" subStatusCode="0" statusReason="Forbidden" statusDescription="Access is forbidden." />
<rule name="Force simple error message for requests for non-existent favicon.ico" stopProcessing="true">
<match url="favicon\.ico" />
<action type="CustomResponse" statusCode="404" subStatusCode="1" statusReason="File Not Found" statusDescription="The requested file favicon.ico was not found" />
<!-- To redirect all users to access the site WITH the 'www.' prefix, will be redirected to
adapt and uncomment the following: -->
<rule name="Redirect to add www" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<add input="{HTTP_HOST}" pattern="^example\.com$" />
<action type="Redirect" redirectType="Permanent" url="{R:1}" />
<!-- To redirect all users to access the site WITHOUT the 'www.' prefix, will be redirected to
adapt and uncomment the following: -->
<rule name="Redirect to remove www" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<add input="{HTTP_HOST}" pattern="^www\.example\.com$" />
<action type="Redirect" redirectType="Permanent" url="{R:1}" />
<!-- Rewrite URLs of the form 'x' to the form 'index.php?q=x'. -->
<rule name="Short URLs" stopProcessing="true">
<rule name="Short URLS" 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" />
<add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" />
<action type="Rewrite" url="index.php?q={R:1}" appendQueryString="true" />
<!-- Pass all requests not referring directly to files in the
filesystem to index.php. Clean URLs are handled in
drupal_environment_initialize(). -->
<action type="Rewrite" url="index.php" />
<!-- If running Windows Server 2008 R2 this can be commented out -->
<!-- httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/index.php" responseMode="ExecuteURL" />
</httpErrors -->
<!-- Set the default document -->
<!-- Set the default document -->
<remove value="index.php" />
<clear />
<add value="index.php" />
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment