Skip to content

Instantly share code, notes, and snippets.

@matt-hensley
Created February 8, 2014 22:44
Show Gist options
  • Save matt-hensley/8891454 to your computer and use it in GitHub Desktop.
Save matt-hensley/8891454 to your computer and use it in GitHub Desktop.
kirby rewrite rules
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true" />
<rewrite>
<rules>
<rule name="Block text files" stopProcessing="true">
<match url="^content/(.*)\.(txt|md|mdown)$" />
<action type="Rewrite" url="/error" />
</rule>
<rule name="Block site" stopProcessing="true">
<match url="^site/(.*)" />
<action type="Rewrite" url="/error" />
</rule>
<rule name="Block kirby" stopProcessing="true">
<match url="^kirby/(.*)" />
<action type="Rewrite" url="/error" />
</rule>
<rule name="Preserve robots.txt" stopProcessing="true">
<match url="^robots.txt" />
<action type="Rewrite" url="/robots.txt" />
</rule>
<rule name="Panel links" stopProcessing="true">
<match url="^panel/(.*)" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/panel/index.php" />
</rule>
<rule name="Site links" stopProcessing="true">
<match url="^(.*)" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true"/>
</system.web>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment