divider

WordPress on Windows: How to Remove the Pesky index.php

Services: Law Firm Website Design . SEO . Internet Marketing . Law Firm Marketing Guide . Content Marketing . PPC

Sometimes we cannot control where we host a blog. In a perfect world, I believe that WordPress should run on a Linux environment (LAMP). However, sometimes you need to run WP on Windows using IIS.

When you run Windows on IIS 6, by default it puts in index.php into the URL parameter. This is so PHP can execute and return your glorious blog pages. However, there is a work-around that we previous posted here. This is an update to that post:

1. First you need ISAPI URL Rewrite installed. We also run FAST CGI.

Download and buy ISAPI Rewrite here.

FastCGI for Windows is here.

2. Update your HTTPD.ini file

Now that you have the programs installed, create a simple httpd.ini file.

#Rewrite wpcontent path (stylesheet, images, admin)
RewriteRule /blog/wp-(.*) /blog/wp-$1 [I,L]

#Removes index.php
RewriteRule /blog(.*)$ /blog/index.php/$1 [I,L]

3. Update your permalink structure

You will need to remove the index.php in your permalink structure of WordPress. Open up settings and click on permalinks. Personally, I like the simplicity of /%postname%/

That should be everything. It also appears that if you are running IIS 7 you can edit the web.config file to update. There are also some other ways to make this work too. So try out their methods too, if those one does not work on your hosting environment.

Thanks!


Related Posts