WordPress Permalinks in Windows Using IIRF
Ionic’s ISAPI Rewrite Filter is an URL rewriting ISAPI filter for IIS 5.0, 5.1, 6.0 and 7.0. It could be found at http://www.codeplex.com/IIRF. It has a detailed online help file, a long list of examples, and a discussion board that has more than 650 discussions. With the help of this filter we have been able to use WordPress in Windows with Pretty Permalinks enabled for nearly a year now without problems. Below are the contents of the iirf.ini file we use.
Remove the www from the site name
The following lines remove the www from the site name. So if users enter www.codehill.com they will be redirected to http://codehill.com.
RewriteCond %{HTTP_HOST} ^www\.codehill\.com$
RedirectRule ^/(.*)$ http://codehill.com/$1 [R=301]
Excluding a Directory from Rewrite Rules
This line excludes the clients directory from any rewrite rules after it. I needed this because the clients directory has a separete application, and it didn’t need any rewriting.
RewriteRule ^/clients/(.*)$ - [L]
Permalinks
This line makes permalinks work. So far I tried it on 3 WordPress blogs and it worked without any changes.
RewriteRule ^/(?!index.php)(?!wp)([^\.]*)$ /index.php/$1 [I]
The Download Monitor Plugin
Download Monitor is a WordPress plugin for uploading and managing downloads.
RewriteRule ^/sourcecode/(.*)$ /wp-content/plugins/download-monitor/download.php?id=$1 [I]
Amged Rustom WINDOWS SERVER · WORDPRESS