If like me you’re trying to remove index.php/%postname%/ from your WordPress URL and just getting 404 errors or 500.19, just copy the configuration text below and past it into your web.config file in the root directory of your website.

Just thought I should point out that I’m running on IIS8.

<rule name=”wordpress” patternSyntax=”Wildcard”>
<match url=”*” />
<add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true” />
<add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true” />
<action type=”Rewrite” url=”index.php” />

I was at this for hours and just getting more and more frustrated, after many a Google I found this solution. I would just like to say many thanks to dom.raman of Micrsoft!




<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]