Removing /index.php/ from Permalinks in WordPress on Windows Server / IIS using URL Rewrites in web.config

Windows and WordPress

A common issue when running WordPress on Windows Server and IIS is that by default you will see /index.php/ in all URLs. We want to removing /index.php/ from permalinks and make things look a bit more tidy.

Most users prefer much more user friendly URLs without “/index.php/”. Fortunately it’s simple to do…

Removing /index.php/ from Permalinks

In WordPress itself, under Settings –> Permalinks set Common Settings to Custom Structure: http://yourwebsite.com /%postname%/

Then, edit your web.config and add the following section to the system.webServer section: