web.config
author Dan Fuhry <dan@enanocms.org>
Fri, 19 Nov 2010 02:47:10 -0500
changeset 1328 2a5845ef8c1d
parent 930 648043f3911d
permissions -rw-r--r--
Some enhancements to the error handler. It replaces out ENANO_ROOT for security, and if the warning is from dbal.php and ENANO_DEBUG is set, prints out a much more verbose message.

<!-- Enano CMS - IIS7 Rewrite support -->

<configuration>
  <configSections>
    <sectionGroup name="rewriteRules">
      <section name="rules" overrideModeDefault="Allow" />
    </sectionGroup>
  </configSections>
  <system.webServer>
    <rewrite>
      <rules>
        <!-- Main rule - short and sweet-->
        <rule name="Enano rewritten URLs" stopProcessing="true">
          <match url="(.*)" ignoreCase="false" />
          <conditions>
            <!-- Don't rewrite if the user requested a real directory or file-->
            <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?title={R:1}" appendQueryString="true" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>