divider

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

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

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]


Related Posts