removing index.php IIS 7.5 webconfig

After struggling for a while in the web.config structure. I found out we need to clear the rule before to add another rule. Just add tag </clear>

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
  <rules>
      <clear/>
    <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>

Leave a Comment