WordPress URL Rewrites for Windows IIS – How to Remove index.php Using HTTPD.ini file

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

WordPress can be run on a Windows server and runs well. The only issue is the PESKY PESKY index.php that appears in the URL path.

If you have Helicon’s ISAPI Rewrite installed (which you should if you are running a Windows server) with the HTTPD.ini file, then simply add in this code to the 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]

Pretty easy. The first line of code allows all your CSS, images, and admin to work. The second line of code removes the index.php. It works and that is all the is needed to get rid of /index.php in the file path.

Two notes:

1. Our permalink path in WordPress is /%postname/. Just change that to whatever you need.
2. Our blog directory is called /blog/. Just change that to whatever you need.
3. If the above does not work for you, try this line of code too: RewriteRule /blog/(.*)$ /blog/index.php\?/$1 [I,L]

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