Just thought I’d share a success story in finally achieving clean urls on an IIS server. I installed a free ISAPI rewrite module from CodePlex. After that just use the following rules in the ISAPI module’s ini file (see codeplex documentation for ini details):
#Change the following to your renamed system folder path:
RewriteRule ^/system/(.*)$ /system/$1 [I,L]
#Add rules for folders you want to accept without rewriting:
RewriteRule ^/images/(.*)$ /images/$1 [I,L]
RewriteRule ^/styles/(.*)$ /styles/$1 [I,L]
RewriteRule ^/themes/(.*)$ /themes/$1 [I,L]
#This allows querystring to be added to the url (like {path=logout} )
RewriteRule /(.*)\?(.*)$ /index.php\?q=$1&$2 [I,L]
#This removes index.php? from the urls
RewriteRule ^/(.*)$ /index.php?/$1 [I,L]
In the EE Control Panel:
1) Remove ‘index.php’ from System Preferences > General Configuration: Name of your site’s index page. (should now be blank)
2) Make sure “Force URL query strings” is set to “No”
That’s it! I really struggled to get this going so I thought it might help someone else in the same situation.