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

A white, rounded square logo with an abstract S-shaped design on a gradient blue and purple background.

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!

Share This
Blog Decorative Background

Join the Sales and Marketing News, receive our last insights, tips and best practices.

Our 7 Guarantees

Keeping 2,000+ Clients Happy Since 2001.

1
You Will Love Your Design We design to please you and your clients
2
Same-Day Support 24-hour turnaround edits during business hours
3
Free Education We provide knowledge to help you expand
4
No Hidden Charges We quote flat-rate projects
5
Own Your Site No strings attached
6
We Create Results SEO, PPC, content + design = clients
7
We Make Life Easier One agency for web, branding and marketing