Redirected from Deki/Installation and Upgrade/Current version/Installing MindTouch Core on Windows (IIS)/Rewrite web.config for IIS7
Was this page helpful?

Rewrite web.config for IIS7

  • You do not have permissions to view this page - please try logging in.
Table of contents
No headers

This file sits in C:\deki\web, and instructs IIS's URL Rewrite module how to act.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Add index.php" stopProcessing="true">
                    <match url="^$" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{URL}" pattern="^/$" ignoreCase="true" />
                    </conditions>
                    <action type="Rewrite" url="/index.php?title=" appendQueryString="true" />
                </rule>
                <rule name="Add index.php with query string parameters" stopProcessing="true">
                    <match url=".*" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{URL}" pattern="^/(@api|editor|skins|config|deki)/" negate="true" />
                        <add input="{URL}" pattern="^/index\.php" negate="true" />
                        <add input="{URL}" pattern="^/favicon\.ico$" negate="true" />
                        <add input="{URL}" pattern="^/robots\.txt$" negate="true" />
                        <add input="{URL}" pattern="^/error/(.*)\.var$" negate="true" />
                        <add input="{QUERY_STRING}" pattern="^$" ignoreCase="true" />
                        <add input="{UNENCODED_URL}" pattern="/(.*)" />
                    </conditions>
                    <action type="Rewrite" url="/index.php?title={C:1}" appendQueryString="false" />
                </rule>
                <rule name="Add index.php with query string parameters (no Search)" stopProcessing="true">
                    <match url=".*" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{URL}" pattern="^/(@api|editor|skins|config|deki)/" ignoreCase="true" negate="true" />
                        <add input="{URL}" pattern="^/index\.php" ignoreCase="true" negate="true" />
                        <add input="{URL}" pattern="^/favicon\.ico$" ignoreCase="true" negate="true" />
                        <add input="{URL}" pattern="^/robots\.txt$" ignoreCase="true" negate="true" />
                        <add input="{URL}" pattern="^/error/(.*)\.var$" ignoreCase="true" negate="true" />
                        <add input="{UNENCODED_URL}" pattern="/([^?]*)\?(.*)$" />
                    </conditions>
                    <action type="Rewrite" url="/index.php?title={C:1}&amp;{C:2}" appendQueryString="false" />
                </rule>
            </rules>
        </rewrite>
        <security>
            <requestFiltering allowDoubleEscaping="true" />
        </security>
    </system.webServer>
</configuration>
 
Was this page helpful?
Tag page
You must login to post a comment.

Copyright © 2011 MindTouch, Inc. Powered by