I am having a hell of a time trying to get IIS Mod Rewrite Pro to work with my wordpress blog, I am trying to remove the index.php out of the URL I have tried many different mod_rewrite rules but none have worked. The blog at the moment is in a subdirectory but when I can get this solved I want to move it to the root, does this matter? Thanks for any help Neil
Just add this line of code at the beginning of index.php $_SERVER['REQUEST_URI']=$_SERVER['HTTP_X_ORIGINAL_URL']; This is a requirement because IIS does not support the server variable REQUEST_URI, which is used by wordpress to resolve the requested page. The directory of your wordpress application does matter at all. If you add the code above, everything will work as with apache. Cheers PS Make sure you use the original rules in .htaccess
Even better, put that line of code at the beginning of wp-settings.php. This works for both wordpress and wordpress-mu. http://mu.wordpress.org/forums/topic.php?id=6208
Thanks again for your help, For some reason I placed this code inside our pages but no luck. Maybe you could post a .htaccess file that works. I tried changing the settings inside wordpress dealing with the permalinks but no luck.
You just need the following on IIS: 1. IIS Mod-Rewrite pro 2. The original wordpress .htaccess rules 3. Add the following code at the beginning of wp-settings.php: $_SERVER['REQUEST_URI']=$_SERVER['HTTP_X_ORIGINAL_URL']; The .htaccess rules: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule . index.php [L] This is a 100% working solution and it's really that simple. You are probably missing something or your wordpress app is misconfigured. The code line above must be copied right after the <?php symbol. Check you security settings, make sure the .htaccess file is in the wordpress root. Also if you use IIS mod-rewrite in test mode remember to restart IIS every 30 or less minutes. Finally, if you have been guessworking by changing the code in wordpress files, I recommend that you re-install wordpress. Cheers!