web.config: Wordpress URL Rewrite

Wordpress URL Rewrite via web.config.

Vervang de web.config door de volgende regels.

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

<system.webServer>

<rewrite>

<rules>

<rule name="Remove html" stopProcessing="true">

<match url="(.*).html$" />

<conditions>

<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />

<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />

</conditions>

<action type="Redirect" redirectType="Permanent" url="{R:1}" />

</rule>

<rule name="Main Rule" stopProcessing="true">

<match url=".*"/>

<conditions logicalGrouping="MatchAll">

<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>

<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>

</conditions>

<action type="Rewrite" url="index.php"/>

</rule>

<rule name="wordpress" patternSyntax="Wildcard">

<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>

</configuration>