Permalink for WordPress – IIS 6 mod_rewrite FIXED – Free

If you install WordPress on IIS you will notice your friendly URLs do not work.  This is because WordPress wants to use an apache add-on called “mod_rewrite.”  The quick rundown of that this does is it will take your friendly browser URL and actually change them to index.php on the back end.  One problem with this method is that IIS does not load apache mods.  Here is an easy and free way around this:

  1. On your IIS Server download and install ISAPI_Rewrite Lite.  This filter does the job of mod_rewrite for IIS.  When downloading make sure to use the free Lite version.  This Lite version does not limit the product very much and will be perfectly fine (and free) for our wordpress blog.  Just install Rewrite Lite to the default locations for this tutorial.
  2. Next add the ISAPI filter to your IIS Site.
    You will find this setting by right clicking yourIIS site -> properties -> ISAPI filters tab -> Add …  Name the filter whatever you wish and your path to your executable should be:
    C:Program FilesHeliconISAPI_Rewrite3ISAPI_Rewrite.dll
    Click OK on both windows to save your settings.
  3. Next navigate to C:Program FilesHeliconISAPI_Rewrite3
    Here we will edit httpd.conf  (Note:  This is the difference between the pay version and the Lite version.  In the pay version you will need to edit the .htaccess file on your web folders root)
  4. Open the httpd.conf file in wordpad and paste in these lines:
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?p=$1 [NC,L]
  5. Save and exit this file.
  6. To complete your IIS changes, Go to start, run and run the command:  iisreset /restart
  7. Now lets change your WordPress settings.  Navigate to http://yourblog/wp-admin
  8. Navigate to the left side menu bar -> settings -> Permalinks
  9. Now you get to choose how you want your posts to look.  I choose a custom setting and just: /%postname%  This is how you see this blog working today.
  10. Click “Save Changes” and you should see your new friendly URLs!

165 Responses

  1. Drew February 22, 2010 / 7:20 pm

    Tried this step by step and no luck getting it to work. The current version ISAPI rewrite (v3) installs properly and does the majority of the updates above automatically with the exception of step 4. Manually edited the httpd.conf file and WordPress STILL will not allow permalinks.
    Any updates regarding this?

    • KyleCaulfield March 12, 2010 / 6:25 pm

      Where is your HTTPD.CONF located? it needs to be in: C:Program FilesHeliconISAPI_Rewrite3

  2. Lars CMS Meyer March 9, 2010 / 12:11 pm

    Very nice wordpress trick – this works like a charm. No need to install og buy components to help rewriting, this is all you need. 5 minutes after finding this guide, my wordpress blog is now working with url rewritten permalinks, perfect 🙂

    Excellent and easy follow guide, i’d recommend it to others.

  3. Jared March 12, 2010 / 12:14 am

    Hi Kyle- I really wanted this to work, but it doesn’t for me. At first, it just redirects to the generic Index.php that shows all of the info for the PHP version that’s currently installed. So then I renamed that generic index.php file to see if it would redirect to the correct one (the one associated with the blog posts). But it didn’t work…it just 404s on me.
    I know you probably can’t answer individual comments, but if you have any insight, I’d love to hear it.

    • KyleCaulfield March 12, 2010 / 6:24 pm

      It sounds like your httpd.conf is not correct… can you post it? Also, the httpd.conf needs to be in the folder: C:Program FilesHeliconISAPI_Rewrite3 (or wherever you have it installed)

  4. Jared March 12, 2010 / 7:15 pm

    Hi Kyle-

    Thanks for writing back.
    Yes, the httpd.conf is located in the C:Program FilesHeliconISAPI_Rewrite3 folder.
    The only thing listed in that file is the lines of code that you posted in the article:
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?p=$1 [NC,L]

    Before I pasted them, it was an empty file.
    As I said, it worked in the sense that it redirected to the “index.php” file that is located in my website’s root folder (which is just the standard index.php file that you get when you’re testing to confirm that PHP is installed correctly). But once I renamed that file (for testing purposes), the redirect would simply go to a 404 page.

    So it would appear that the redirect is working somewhat, but it seems to be pointing to the wrong file location. Does that sound about right to you?

    In the past, I’ve had a lot of issues with giving the internet user account certain rights to other folders. Do you think that might be an issue here? I wouldn’t think so, since the “work” is being done on the server side, but stranger things have happened.
    Thanks again for any insight you can give. I appreciate it.

  5. Jared March 14, 2010 / 1:14 am

    Okay, a bit of an update. Hopefully this can help us figure out what’s going on.

    I changed the fourth line of code in the the httpd.conf file to include the path to the correct index.php file. So the new line looks like:
    RewriteRule ^(.*)$ blog/index.php?p=$1 [NC,L]

    Since my blog is not in the root directory, this tells the rewrite where to find the correct index.php. I can’t believe I didn’t think of that earlier. However, it still doesn’t function correctly.
    Now, no matter which post I click on, it simply loads the “home” page of the blog. The browser address bar shows a nice permalink (, but what appears on the screen is just the home page, not the actual post.

    So we’ve taken two steps forward and one step back.

    BTW, if I include the “index.php” as my permalink setting in WordPress, everything works great. (e.g.

    But I’d prefer not to include that reference to index.php if I can help it.

    Any thoughts?

    • KyleCaulfield March 14, 2010 / 3:01 pm

      Jared — I have not tried to have my blog posted anywhere but the root site, but have you tried changing the line:
      RewriteBase /

      RewriteBase /blog/

      I think this might help. As for the security I had unrelated problems to that before but if security was not set correctly I think IIS would request a username and password from you. This issue is something with out ISAPI rewrite. Don’t give up! It is trying to work, we just need to massage the settings a little bit.

      Kyle Caulfield

  6. Jared March 14, 2010 / 4:24 pm

    Just tried it.. no luck. It puts up a 404 error with that change if I try to go to the permalink without the index.php in there.

    I know absolutely nothing about coding, so please take this with a grain of salt, but I wonder if it has something to do with the “?p=$1 [NC,L]” text in that last line.

    It seems to me like the redirect is getting us to index.php, but isn’t pulling the correct post number from there, so it simply defaults back to index.php.

    I think I’m stuck with “partly” pretty permalinks, at least for the time being. It’s not the end of the world, but it would be nice to avoid it if I can.

    Thanks again for your response. I figured leaving the comments here would be best, just in case we discover a solution that can possibly help someone else with this issue in the future.

    • KyleCaulfield March 14, 2010 / 8:18 pm

      No problem Jared — I want to get this working for you! Can you verify the settings in wordpress? Go to Settings in wp-admin and then go to permalinks and let me know how you have that set up. PS the p=? is how wordpress normally finds what post you are looking for, so I think you are on the right track.


      Can you try this in your httpd.conf file:

      RewriteBase /blog/
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule .* index.php [L]

  7. Jared March 15, 2010 / 6:43 pm

    Thank you for trying, but unfortunately, that didn’t work either. It still just redirects back to the blog’s home page.

    In fact, everything redirects back to the blog home page (even 404 errors). Clicking on any link in the blog simply reloads the blog’s default page (even though the address in the browser’s address bar changes).

    In my wordpress settings, I have to use /index.php/%postname%/ to make it work. Each time I test it, I remove “/index.php” so that it becomes simply: /%postname%/. But so far, we haven’t been able to make it work without keeping the “index.php” part in there.

  8. KyleCaulfield March 15, 2010 / 7:21 pm

    This is a shot in the dark, but you said you had /%postname%/ in your setttings… have you tried /%postname% ?

  9. Jared March 15, 2010 / 8:51 pm

    Yep, tried that one too. I’ve even tried it with a “.html” on the end.

    It works just fine so long as index.php is in the path, but fails whenever it’s missing.

  10. Jose March 18, 2010 / 7:28 pm

    I’m having the same exact problem Jared is having. Any ideas?

  11. Brent March 19, 2010 / 11:07 pm

    Any solutions if you have it hosted elswhere on IIS6, and not having access to the IIS control panel? Thanks!

  12. JC March 25, 2010 / 5:35 am

    Thanks, after weeks of mind-numbing dealings with Apache on Windows I finally did what you said and it works for my WordPress sites.

    I believe that some of the problems posted here are because they are not using WordPress since the matched pattern for what you write matches URL’s that contain index.php?p= .
    If any other application is being used you will have to modify the httpd.conf accordingly.

    If you want a particular pattern matched please email me at and I will try to help.

  13. Almeros March 26, 2010 / 8:39 am

    I had the same problem as Jared, and I found a fix for it (for WordPress 2.9.2 with ISAPI_Rewrite3), so I hope it helps you too Jared!

    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(index.php)*(.*)$ index.php/$2 [NC,L]

    I will explain some more about it on my own blog which should soon be online (at time of writing this) at

    • Ken Ng February 16, 2012 / 3:37 pm

      This worked for me! Fixed a WP site of a friends with this rewrite rule. Thanks!

  14. Jared March 26, 2010 / 8:21 pm

    Thanks for posting. I *really* wanted it to work and was hoping it would. I went over the installation several times to make sure I was doing everything correctly and had typed it in right. I even cut-&-pasted your code to avoid errors, although I did have to add /blog to make sure it was referencing the correct index.php for my installation.

    But alas, it did not work. It creates a 404 error when I take index.php out of the permalink path. But here’s the interesting bit…the 404 is a new one. It’s the one that is part of my blog theme, NOT the normal generic 404 from Windows. So it’s something new. And the title bar says “Nothing found for Blog Index Php Blog”, which I’ve never seen before.

    I get the impression that we are really close to solving this, and that is has something to do with the syntax in that final line of code. But unfortunately, I’m just not smart enough to crack it. 🙂

    Just in case it’s needed, here are all my “specs”:
    -Windows 2003 service pack 2 64 bit (IIS running in 32 bit mode)
    -MySQL 5.1
    -PHP 5.2.13
    -Wordpress 2.9.2

    I think that’s it, but let me know if you need anything else.

    Thanks guys for trying. I’m still keeping my fingers crossed.

  15. KyleCaulfield March 26, 2010 / 10:02 pm

    Jared — Stupid question, what version of WP are you running? Newest?

  16. Jared March 27, 2010 / 8:40 am

    See the last line of my previous comment: 2.9.2 Based on what I can see, I think that’s the newest non-beta release, but I could be wrong.

    What are you running?

  17. bobkknd March 27, 2010 / 8:39 pm

    E, ,,
    i like load~~~~

  18. PlayTEX March 30, 2010 / 2:53 am

    This has been bugging me too for sometime too.


    Place this in your .htaccess file or .conf file depending on the version of Helicon ISAPI rewrite you have installed. (.htaccess file to be located in “blog” subdirectory)


    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^blog/(.*)$ blog/index.php/$1 [NC,L]

    where “blog” is the subdirectory.

    Turn permalinks on and use either

    /%postname%/ for just a url or
    /%postname%.html for articles to end in .html i.e.

    Simple 🙂

  19. Jared March 30, 2010 / 5:24 pm

    PlayTEX…nope. Same issue as the last time I tried. It 404’s on me, using the blog theme’s 404 page instead of the generic Windows one.

    (although with the spam in your comment, I probably should have guessed)

    There must be some setting in/on my system that apparently is different from the others who have gotten this to work. Such is the life of a Windows server, eh? 🙂

  20. 21csm April 8, 2010 / 3:17 pm

    I have the same problem as Jared. And none of solutions above helped me either.

    WP settings are: /%year%/%monthnum%/%postname%/
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wp/index.php [L]

    And as the result I have:
    correct permalinks listed in browser’s address bar though every of them just leads to blog’s index page (with all posts listed).

    Can anyone advise with the correct settings?

  21. Almeros April 9, 2010 / 7:08 am

    Hi Jared and all others,

    After I posted my last comment I was happily installing everything on my live server just to get yet another 404 problem :S. This time it was IIS. Today I solved it and I wrote a blog article about all my fixes for the WordPress on IIS 404’s. Check it here:

    I really hope you can find your solution there now, because I know how annoying this is ;).

  22. 21csm April 11, 2010 / 1:28 pm

    Greetings to Jared and others.
    I solved IIS / mod_rewrite problem for my site but without using Helicon ISAPI_Rewrite Lite. This particular module did not work before I put special PHP-hacks in wp-settings.php (like statement $_SERVER[‘REQUEST_URI’] = $_SERVER[‘HTTP_X_REWRITE_URL’]; in the very beginning of file) and even then I couldn’t fully adjust it.
    I overcome Rewrite problem by using Ionics Isapi Rewrite Filter. It did not require anything to be patched in WP though I had to create rewrite rule for every special case.
    You can see my configuration file shared.
    Maybe it’s a kind of brute force method but it worked for me.

  23. PlayTEX April 13, 2010 / 12:28 am

    If you are getting 404 errors have you actually checked that the rewrite is occurring?

    I initially had this error and had to go through the Helicon log files to spot it… on doing so I reconfigured the site settings within plesk and it worked.

    P.S last post only contained a link for reference to my blog that works… not spam

  24. Rafael M April 26, 2010 / 6:59 am

    What about those who do not have access to the IIS in their hosting?
    I cannot even start by installing ISAPI_Rewrite Lite.
    Any suggestions?

  25. Max April 27, 2010 / 12:48 pm

    Lars CMS Meyer said “…this is all you need. 5 minutes after finding this guide”

    Yes i agree. I’d say it took me about 5 minutes to get Permalinks working in WordPress.. using ISAPI_Rewrite3 on IIS 6.0

    Thanks for posting this – very useful !

  26. Max April 27, 2010 / 1:03 pm

    update… right after fixing the Permalinks in a WordPress application, (as above) i spent the next 5 minutes undoing it all again as it trashed all of the other sites on the same server 🙁

    Not sure what to do now? jump off the nearest high building?

  27. Kyle Caulfield April 30, 2010 / 9:48 am

    Max – Just enable the isapi filter for the sites you would like a friendly url, not all sites =)


  28. Taz May 16, 2010 / 9:51 am

    First of all, thanks for the providing the step by step process. I followed the instruction and got the permalinks to work. However, it changed the contents of all the pages. Now even on every static page except home, it shows all the blog entries. So, other than home every page looks like the blog page. Is there anything I’m doing wrong? I’d appreciate any pointers you may have.

  29. men of shuangxi May 18, 2010 / 11:45 am

    I haven’t install wordpress on windows myself ,but i think if i do it also in the future, I can reference your method.

  30. Chris May 20, 2010 / 10:33 am

    For WordPress MU, I followed your instructions but added this to my httpd.conf:

    RewriteEngine On
    RewriteBase /

    #uploaded files

    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    # add a trailing slash to /wp-admin
    RewriteCond %{REQUEST_URI} ^.*/wp-admin$
    RewriteRule ^(.+)$ $1/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . – [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]
    RewriteRule . index.php [L]

    Everything works great! Thanks for this write up!

  31. Brian V. Hunt May 29, 2010 / 1:50 pm

    Kyle et al,

    I have the permalinks working with this code in the IsapiRewrite4.ini file:

    RewriteCond %{REQUEST_FILENAME} ^wp-content.*
    RewriteCond %{REQUEST_FILENAME} ^wp-admin.*
    RewriteCond %{REQUEST_FILENAME} ^wp-include.*
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    RewriteRule ^/(?!wp-)(.+)$ /index.php/$1 [I,L]
    RewriteRule ^/sitemap.xml$ – [L]

    All of the links work fine with that code EXCEPT if I create drop-down menus with parent/child pages. Then when I click a child page on the menu, it displays a URL with the correct parent/child, but the page displayed is actually the parent page.

    Anyone else see this?

  32. Sally June 6, 2010 / 6:37 pm


    I have successfully installed ISAPI_Rewrite3_0073_Lite.msi
    It seems to be working fine but I’m not sure how I can get it to remove all references of index.cfm from the url for all pages on the website?? Also I am using mura not wordpress

  33. Neo June 9, 2010 / 8:23 am

    Got it to work on Windows 2003 on IIS 6.0.

    Here we go:

    1. Install ISAPI Rewrite 3 Lite, just as it is described above.
    2. Put this on the C:Program FilesHeliconISAPI_Rewrite3http.conf file:

    # BEGIN WordPress

    Options +Followsymlinks
    RewriteEngine On
    RewriteBase /yoursubdirectoryname/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php [L]

    CheckSpelling On

    # END WordPress

    Restart IIS only if you’re just installed ISAPI Rewrite. You dont nedd to restart IIS each time you modified this file.

    3. DO NOT install plugins or other stuff out there. You dont need it.
    4. Enjoy

    • HARE May 25, 2015 / 3:17 pm

      Thanks NEO, worked great for me!

  34. Phil June 10, 2010 / 11:36 am

    Thanks Neo. That worked for me 🙂

  35. OhYa June 13, 2010 / 4:16 pm

    Well, I have tried all of the above to no avail.
    I have IIS 6 (win2003)
    using WordPress 2.9.2.
    MySQL 5
    When trying to visit a permalink page I get this,
    CGI Error
    The specified CGI application misbehaved by not returning a complete set of HTTP headers.

  36. lexx2gee June 15, 2010 / 7:50 am

    Is there a way to allow certain extensions such as axd to be used with the filter running?

    I set this up as per instructions and the permalinks worked fine but other aspects of my website (especially where using ajax) stopped working and started throwing errors etc.

    Any ideas?

  37. Rich June 20, 2010 / 9:18 am

    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(index.php)*(.*)$ index.php/$2 [NC,L]

    Works great!!!!
    Windows 2003 IIS 6 with Joomla 1.5
    Fully rewrites URL without /index.php/

  38. Hiding June 23, 2010 / 6:57 pm

    I have the solution for you when you install ISAPI REWRITE on IIS 6. The Helicon isapi filter is defaultly installed for ALL of your sites. So I had it up and running for my wordpress site but all other sites were scr*** up. So just go to your IIS manage and click on ‘Web Sites’ folder and remove it from the ISAPI filters list. Worked wonderfully for me.

  39. wwerwr July 2, 2010 / 7:24 pm

    are you go to 138站长站

  40. RED July 5, 2010 / 12:04 pm

    Ok. I have installed but do not have an httpd.conf file but an httpd.ini file

    I cannot edit the .ini file as it seems to be in use. placing ghe httpd.conf doesnt seem to do anything.

  41. BIA July 20, 2010 / 1:05 pm

    Thanks, worked great!

  42. romenov July 30, 2010 / 3:09 pm

    I helped this guy on an IIS with his prophoto theme, but he is running IIS and is using HTTPD.ini for his permalinks, he doesn’t have any install access, but ISAPI should be running.
    The content is:


    # For file-based wordpress content (i.e. theme, admin, etc.)
    RewriteRule /wp-(.*) /wp-$1 [L]

    # For normal wordpress content, via index.php
    RewriteRule ^/$ /index.php [L]
    RewriteRule /(.*) /index.php?$1 [L]

    # /index.php/ is not really necessary
    # RewriteRule ^/$ / [L]
    # RewriteRule /(.*) /?$1 [L

    now that works fine, say site/test , site/blog/postname , but when you try site/blog/page/2 it fails .. also when running qtranslate, when you go site/en/ it also fails, any suggestions? 🙁 I can’t find help on this

    • Shiva March 26, 2013 / 3:01 am


      Hi Romenov,

      1. It works fine only on PHP site.
      2. All other ASP and ASP.NET sites are having an issue. images are not loading on and virtual directory are not working properly.
      3. I have created virtual ASP.NET website under that WordPress site. it’s not working and gave me 404 error.
      4. please assist me.

  43. mpthemes August 8, 2010 / 8:52 am

    Thanks! This help me a lot!

  44. Matt August 22, 2010 / 4:57 pm

    I have managed to move a word press site from one server in a subfolder of another server. All seems fine. Apart from one thing. I cannot load the index.php file from the server if accessed like…

    but this works fine

    Running on IIS6, Helicon Rewrite3

    I have tried having default document as index.php, with no luck. the rule in rewrite is…

    RewriteBase /business-development/

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php [L]

    Any ideas?

  45. Lars September 1, 2010 / 3:49 am

    This worked fine for me. My only problem was the with the installation of the rewrite plugin it automatically installed over all websites. So after i skipped step 2 everything was working fine.

    Windows server 2003(Vserver)
    IIS 6
    Wordpress > 3.0

  46. Billy Clarke September 3, 2010 / 5:01 am

    Please help!

    I’m working on a MAC, WP is installed on client server (Windows) and I’ve downloaded the plugin, uploaded files and installed, but it still doesn’t work.

    You mention things like “You will find this setting by right clicking yourIIS site -> properties -> ISAPI filters tab -> Add … Name the filter whatever you wish and your path to your executable should be:
    C:Program FilesHeliconISAPI_Rewrite3ISAPI_Rewrite.dll
    Click OK on both windows to save your settings.”

    As I’m on a MAC, I cannot see this OR, am I being blind?

    Please help 🙁

  47. Kyle Caulfield September 3, 2010 / 7:29 am

    Hi Billy

    What is your web server? IIS or Apache?


  48. Chris September 7, 2010 / 7:22 am

    Hi guys,

    I have been having the same problems as most of you on here, but have finally cracked it. I guess it will be different depending on your implementation. But, here’s what got me up and running…

    I created a Virtual Directory called ‘myblog’ on IIS 6 for my WordPress blog. My blog is accessed via:

    My website runs coldfusion pages as default (.cfm) so I changed the default page for my virtual directory to index.php

    I then followed the instructions on this post as above.

    When editing the httpd.conf file I added the following code:

    RewriteEngine on
    RewriteBase /myblog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(index.php)*(.*)$ index.php/$2 [NC,L]

  49. Pat September 11, 2010 / 6:57 am


    I worked on this for what seemed like forever. Using Windows 2003, IIS 6.0 and WP 3.01 with BuddyPress and my install is in a directory (not the root).

    After much frustration – Neo’s suggestion worked the charm and was able to eliminate the index.php and choose any type of custom permalink. I added the following to a .htaccess found in the same directory as my index.php file.

    # BEGIN WordPress

    Options +Followsymlinks
    RewriteEngine On
    RewriteBase /yoursubdirectoryname/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php [L]

    CheckSpelling On

    # END WordPress

    Sometimes the easiest of solutions works like a charm.

    Hope this helps someone to reduce frustration.

    Thanks Neo!


  50. nn September 12, 2010 / 11:52 pm

    I folllowed the instructionson
    The permalinks for wordpress works but…

    On the IIS server I have other websites. They all work fine except a sharepoint site.
    When I go to the sharepoint site i get a “http 404 not found error”

    The websites use host headers. The name of the sharepoint site is the same as the server.

  51. snake October 3, 2010 / 2:53 pm

    I have tried many solutions including this one, and still cannot get it working.
    All other solutions I have tried still result in a 404 error.
    The rewrite rule here gets rid of the 404 error but every link just displays the index.php and not the actual page.

    ISAPI REWRITE 3 is working fine I have confirmed this by testing other rules.
    I have set cgi.fix_pathinfo=1 in the php.ini

  52. Arbaz October 7, 2010 / 5:41 pm

    i tried step by step what you said, it worked fine for wordpress permalink SEO URLs but it ruined my 2.0 SEO URLs. so i deleted it.

  53. Chris October 13, 2010 / 11:56 pm

    Permalinks for wordpress work again, no more errors :). Thanks for the tutorial!

  54. Cincinnati October 18, 2010 / 3:20 pm

    Right on! Thank you so much for this fix. Due to a VPN error we decided to use a virtual terminal to upload a website. Your plugin was necessary on the VM; worked like “magic” (After a day spent looking for fixes). Thanks!!!!!

  55. Chris October 26, 2010 / 12:48 pm

    None of these suggestions works for me. No matter what I try, I always get the IIS 404 error. Sux I can’t do this!!

    Windows Server 2003 SP2
    IIS 6.0
    MySQL 5.1
    Wordpress 3.0.1

  56. Mustaq October 28, 2010 / 2:25 pm

    Thanks for solution, it worked fine for me but I have got one issue.
    When I updated the httpd.con file my other site links stopped working.
    Is there any settings in this file by which I can limit it to only one website rather than whole iis?

    Thanks in advance.

  57. Bhupinder November 2, 2010 / 8:30 am

    i have setup the wordpress blog on local and is running well but when i set up on staging the permalink not work bcoz there is IIS server is there any way to do url rewrite through code or also tell me to transfer the blog to Linux sever.


  58. Richard Jones November 6, 2010 / 5:54 pm

    FYI, because I spent two days figuring this out:

    If you installed ISAPI_Rewrite from the installer package, you should not be manually adding an ISAPI filter to any of your sites, despite what instructions at various places on the Internet tell you.

    Doing so will cause problems because the installer package already installs a global ISAPI filter for you. Adding another ISAPI filter on top of this causes the filter rules to run twice, which is not good.

    See this link for verification from Helicon Tech:

    Hope this helps some people.

  59. Techkol November 9, 2010 / 4:06 am

    hay i’m working on linux server, its same on it.. thanks buddy

  60. Badbo November 9, 2010 / 10:39 am

    Since PHP5.3.3.3 isapi has went out the window and is no longer packaged with PHP. Replaced with fastcgi so the best
    bet with windows platform is Fastream IQProxy for half the cost.

  61. Oz November 10, 2010 / 10:00 am

    Thanks A lot
    It worked perfectly!

  62. jtmtb November 23, 2010 / 1:55 pm

    Follow the steps and it work like a charm.

  63. Leonard November 30, 2010 / 5:34 am

    Hey guys,

    Have been following some of your problems as I’ve had some myself. After seeing Richard Jones comment and having a dig about it seems that a lot of problems maybe caused by IIS running filters either side of ISAPI_Rewriter. I think only affects people running ASP.NET 4 though it could effect others.

    Firstly I had problems with every page request bringing up the home page then once I’d got over this I found they were all 404s! My suggested course of action if your getting 404s all over the place, add this to your themes 404.php somewhere it’s going to be visible to you:

    This will show what is hitting WordPress; I noticed my URL request was being violated by eurl.axd/[random string] so it looked like this:

    This was causing my 404s. Thanks to some help from the guys on stackoverflow I managed to mod my htaccess to remove this from my requests. I have posted my (so far fully working) htaccess code below. Hope it helps!


    RewriteEngine on
    RewriteBase /

    # This is used to strip eurl.axd bits
    # from the URL so wordpress can use permalinks

    # For the root
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^eurl.axd/[0-9a-f]+/$ index.php [NC,L]

    # For internal permalinks
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/eurl.axd/[0-9a-f]+/$ index.php/$1 [NC,L]

  64. Leonard November 30, 2010 / 5:45 am

    Spoke to soon! It works but breaks the root of wp-admin. (If only you could edit comments!). Anyone find any other issues?

    This should work though:

    RewriteEngine on
    RewriteBase /

    # This is used to strip eurl.axd bits
    # from the URL so wordpress can use permalinks

    # For the root
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/wp-admin/
    RewriteRule ^eurl.axd/[0-9a-f]+/$ index.php [NC,L]

    # For internal permalinks
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/wp-admin/
    RewriteRule ^(.*)/eurl.axd/[0-9a-f]+/$ index.php/$1 [NC,L]

  65. cialis bestellen December 5, 2010 / 12:01 pm

    Super-Duper web site! I’m loving it!! Will arrive again again – taking you feeds also, Thanks.
    Hello. Good job. I did not expect this on the Wednesday. This is a terrific story. Thanks!

  66. Wayne Zimmerman December 14, 2010 / 7:36 am

    This works great, I migrated from apache to IIS and this was the missing link, thanks a bunch.

  67. glenn January 4, 2011 / 1:53 pm

    this works fine for me as long as i use one of the standard options. If I use as above, /%postname% then the posts work but the archive links per month fail!

  68. Gabe Shackle January 12, 2011 / 9:28 am

    Solution to /index.php/ problem:

    I was having the save issue as Jared earlier with the site needing to have /index.php/ to show up. After some digging I came to a comment on another site that this as the last line in the .conf file:

    RewriteRule ^(index.php)*(.*)$ index.php/$2 [NC,L]

    By changing it to that I was able to get the permalinks working on iis6 without the /index.php/ having to be there.

  69. Kinch January 12, 2011 / 12:37 pm

    So I was looking for a way to limit the url rewrite to one domain since we have multiple sites on our IIS 6 web server and the the base httpd.conf rules were affecting all of the sites and breaking some of them.
    So I was looking for a way to limit mod_rewrite to one domain. To affect only one domain for permalinks I had to add this Rewrite Condition: RewriteCond %{HTTP_HOST} ^(www.)?$
    This applied the mod_rewrite rules only to the one domain as desired.
    Complete httpd.conf to apply mod_rewrite to one domain

    RewriteBase /
    RewriteCond %{HTTP_HOST} ^(www.)?$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?p=$1 [NC,L]

    Hope this saves you time!

  70. Stace January 25, 2011 / 11:43 am

    Has anyone else had problems with Page links? I still 404 on pages, but postings work.

  71. Gaurang February 6, 2011 / 11:35 pm


    I tried above step and install ISAPI in IIS 6.0
    Then change in httpd.comf file as mention above

    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?p=$1 [NC,L]

    then I did change like this

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?p=$1 [NC,L]
    RewriteRule ^/home /Home/Job.aspx

    but it gives me error page not found 404
    so now what should I do.

    I have not put my website in wwwroot but in separate folder
    in C:/Publish/WEBSite.
    Creating Virtual directory for the website and host it

    I have added the ISAPI filter to your my website
    C:Program FilesHeliconISAPI_Rewrite3ISAPI_Rewrite.dll
    Click OK on both windows to save your settings
    as well as
    In my website directory folder also.


  72. Adam February 10, 2011 / 11:37 am

    This worked flawlessly. Thanks for taking the time to post these instructions.

  73. jay February 10, 2011 / 12:30 pm

    hmmm I managed to make it work but….. It doesn’t work 100% in every browser, the only browser that does it perfectly is firefox all the others break after going deeper in the links. I am running buddypress on iis6 using isapi rewrite 3. any help would be greatly appreciated. Thanks

  74. Rob February 14, 2011 / 8:05 am

    hi all,

    I am pulling my hair out over this.
    I have followed all the instructions at the top of this page but as soon as I switch from the default setting to a custom structure (or one of the other options) I can no longer view my blog at even, not even the home page.

    To access my blog I have the following URL

    Please help 🙂

  75. Jim February 23, 2011 / 7:14 pm

    I added this to my htaccess and it started working again. Thx

  76. tampert March 9, 2011 / 8:08 am

    Thanks very usefull!!

  77. sonny March 17, 2011 / 12:54 am

    OMG finally I have been working with e-commerce plugin for word press and nothing worked, I didn’t have any issues using the permalinks but the add to cart would not work. with this suggestion it works finally.
    Thank you so much almeros and everyone on here.

    March 26, 2010 at 8:39 am
    I had the same problem as Jared, and I found a fix for it (for WordPress 2.9.2 with ISAPI_Rewrite3), so I hope it helps you too Jared!

    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(index.php)*(.*)$ index.php/$2 [NC,L]

    I will explain some more about it on my own blog which should soon be online (at time of writing this) at

  78. royal T March 18, 2011 / 9:45 pm

    Extremely Helpful, thank you for the post

  79. Simon March 19, 2011 / 4:39 pm

    worked a treat… I have been trying to do this for months. finally a good guide that actually works

    Thanks very much

  80. Treasure Hunters Roadshow May 13, 2011 / 8:03 am

    Please let me know if you’re looking for a writer for your blog. You have some really great posts and I think I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write some articles for your blog in exchange for a link back to mine. Please blast me an e-mail if interested. Kudos!

  81. brian May 17, 2011 / 8:17 am

    I had problems with the example httpd.conf not working. It was not reading QueryString values. I solved this in WP 3.1.x by using this:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

  82. Pingback: All links |
  83. wproad June 19, 2011 / 7:07 am


    # 3600 = 1 hour
    CacheClockRate 3600
    RepeatLimit 32
    # Protect httpd.ini and httpd.parse.errors files
    # from accessing through HTTP
    # Rules to ensure that normal content gets through
    RewriteRule /sitemap.xml /sitemap.xml [L]
    RewriteRule /favicon.ico /favicon.ico [L]
    # For file-based wordpress content (i.e. theme), admin, etc.
    RewriteRule /wp-(.*) /wp-$1 [L]
    # For normal wordpress content, via index.php
    RewriteRule ^/$ /index.php [L]
    RewriteRule /(.*) /index.php/$1 [L]

  84. Madelyn Galloway August 20, 2011 / 9:13 am

    #:-) Just to let you know that I got a hyper link to your web site from search engine result advertising visionary Themelis Cuiper – you are doing an awesome job as he provides a hyper link to you!

  85. Charlie Holland August 27, 2011 / 12:49 pm

    Thanks for that, saved me more head banging in my migration from SubText

  86. Pingback:
  87. Ruby Lewis September 12, 2011 / 12:25 am

    Who knows R there as good professional reputation service than Paccar? They only cost $49 which is not much, unfortunately… 1 have to provide 5 more options for my boss. :>

  88. Derk Gates September 15, 2011 / 7:49 pm

    I have the permalinks working, but now I can’t delete or update plug-ins. I received messages like the following:

    Plugin could not be deleted due to an error: Could not fully remove the plugin(s) hello.php.

    “hello.php” changes depending on the plug-in. I can install new plug-ins, I just can’t delete them.

  89. lol October 4, 2011 / 6:16 pm

    excellent material from your site,,great stuff
    i will most certainly vist again..

  90. Cameron October 7, 2011 / 8:55 am

    almeros –
    I have the same set-up as you and used your code and it worked perfectly. THANK YOU! HOURS spent trying different things and i finally tried your post and it worked. THANK YOU AGAIN!

    I had the same problem as Jared, and I found a fix for it (for WordPress 2.9.2 with ISAPI_Rewrite3), so I hope it helps you too Jared!

    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(index.php)*(.*)$ index.php/$2 [NC,L]

    I will explain some more about it on my own blog which should soon be online (at time of writing this) at


  91. ahsijetaisriche October 18, 2011 / 5:21 pm

    I just follow your instructions and it works perfectly on Win2003/IIS6.

    Thanks a lot.

  92. Ruskyj October 20, 2011 / 12:46 pm

    Hi all. I just found a solution for my (yours) headaches !

    Setup: WordPress 3.2.1
    Microsoft Windows Server 2003, IIS 6 running on VPS
    ISAPY_Rewrite 3

    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/wp-admin/.*
    RewriteRule .* /index.php [L]

    In httpd.conf

    Source: (at the bottom)

    ENJOY !

  93. vijai November 14, 2011 / 6:13 pm

    worked like a charm. Thanks for the blog

  94. Fakhrul Alam November 29, 2011 / 2:55 am

    Hi.. Thanks for sharing and writing the post and you took your time to write it,s I appreciate it.. One question I want to ask is.. Does this method still work in latest wordpress version which is 3.2.1 and latest windows server..waiting for your reply..thanks Alam

  95. Michael December 15, 2011 / 9:01 pm

    Hi Guys

    I found this thread very informative! We host many sites on Windows Servers using IIS6 and had this 404 issue with WordPress though the main thread above and many of the others below did not rectify the issues fully but with a bit of playing this was what we found worked 100%

    install ISAPI_Rewrite Lite as above but when finished if multiple domains on the server within IIS remove this filter from the the main “Websites” properties and just add the filter to the individual domains that require it. This needs to be done or the sites running .NET go tits up and do not display properly.

    Then add these lines to the Httpd.conf file:

    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(index.php)*(.*)$ index.php/$2 [NC,L]

    Make Sure if wordpress puts a htaccess file within the website space this is removed.

    Wallah thats it everything works 🙂

  96. long January 3, 2012 / 8:06 am

    hi everybody, my serv using now 2 sites: wp and discuz
    My discuz in httd.conf

    # RewriteEngine
    RewriteEngine On

    RewriteBase /

    # Rewrite
    RewriteCond %{QUERY_STRING} ^(.*)$
    RewriteRule ^topic-(.+).html$ portal.php?mod=topic&topic=$1&%1
    RewriteCond %{QUERY_STRING} ^(.*)$
    RewriteRule ^article-([0-9]+)-([0-9]+).html$ portal.php?mod=view&aid=$1&page=$2&%1
    RewriteCond %{QUERY_STRING} ^(.*)$
    RewriteRule ^(w+)-([0-9]+)/(.*).html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1
    RewriteCond %{QUERY_STRING} ^(.*)$
    RewriteRule ^baiviet/(.*)-([0-9]+)-([0-9]+)-([0-9]+).html$ forum.php?mod=viewthread&tid=$2&$3&page=$3&%1
    RewriteCond %{QUERY_STRING} ^(.*)$
    RewriteRule ^group-([0-9]+)-([0-9]+).html$ forum.php?mod=group&fid=$1&page=$2&%1
    RewriteCond %{QUERY_STRING} ^(.*)$
    RewriteRule ^(.*)-([0-9]+)/(.*)$ home.php?mod=space&$1=$2&%1
    RewriteCond %{QUERY_STRING} ^(.*)$
    RewriteRule ^blog/(.*)-([0-9]+)-([0-9]+).html$ home.php?mod=space&uid=$2&do=blog&id=$3&%1
    RewriteCond %{QUERY_STRING} ^(.*)$
    RewriteRule ^([a-z]+)-(.+).html$ $1.php?rewrite=$2&%1

    That’s work great!
    and now, i wanna rewrite url my wp site , in httpd.conf file, what i need write on??

  97. mukesh January 3, 2012 / 12:41 pm

    No need to install any ISAPI filter to remove the index.php from WordPress permalinks.No need of .htaccess file..Use these simple steps to WordPress Permalinks in IIS 6.0 using Custom 404 Redirect for Windows Shared hosting/manas hosting or any windows shared hosting.

  98. albert estillore January 10, 2012 / 7:01 pm

    Hi just tested a while ago, and I came up to the successful one.

    thank you so much it is a good wordpress tricks.

  99. Michal John January 15, 2012 / 3:36 am

    By mistake I have installed a php script in my root directory, where wordpress is available. After that my all permalinks has been change. After modifying .htaccess file and modified file permission by ftp now My site site is almost ok. Now i can’t log-in admin panel, when i am giving admin user name and password then url redirect to (extra index.php has shown) and nothing found for index php login. How can i remove that extra index.php for log-in my wordpress admin control panel? Please help me!

    Thanking in advance.

  100. Don January 31, 2012 / 4:17 pm

    Hi all

    I have tried all of these .htaccess configs, nearly all of them actually produce the desired url re-wite, but they all break my sites links to css, images and js etc so I get an un-styled site.

    Any ideas?


  101. Gian Mario March 6, 2012 / 5:58 pm

    Hello, I have IIS6 and both PHP and Coldfusion.
    So, i need to “disallow” Isapi_rewrite in a specific domain but now is running in all the websites in this server:

    I added this line to the basic configuration:

    RewriteCond %{REQUEST_FILENAME} !(

    because I don’t want to run with this, but id does not work… how is it?

  102. Taschen Fan April 8, 2012 / 9:34 am

    Thanks for this Blog Entry and sry for my bad english, i am german, but you helped me alot with this informations.

  103. barry April 12, 2012 / 7:39 pm

    Guys, after trying everything out there, I followed your instructions, and it works like a treat on Windows 2003 x64 with IIS6.

    Thanks so much.

  104. Barry April 18, 2012 / 8:04 am

    I had 3 blogs on IIS6 win2K3, two with static wordpress pages as home and the other a news site

    The only solution that worked on all 3 blogs and did not screw up the CSS was

    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(index.php)*(.*)$ index.php/$2 [NC,L]

    Thanks almeros

  105. Jerry April 29, 2012 / 9:30 am

    Hi Don,
    Regarding it breaking the CSS, try adding this line as a condition:
    RewriteCond %{REQUEST_URI} !^/wp-content/.*

    I got the idea from Ruskyj’s post.. it’s 5:30am and I’ve now finally got it working!!

  106. santa May 4, 2012 / 11:45 am

    Great blog.

  107. Jim May 30, 2012 / 7:35 pm

    Works like a champ. Thanks dude

  108. Ron March 1, 2013 / 6:21 pm

    Thanks so much for your tutorial on this. Very easy to follow and worked like a charm!
    I just set this up on Windows Server 2003 running IIS 6 and Parallels Plesk 11.x. For anyone running 2008 with IIS 7 and newer there’s a different solution available.
    I’m haven’t played with IIS and since 2.0 so a bit out of practice, greatly appreciate your sharing =o)…

  109. Manoj August 5, 2014 / 1:57 pm

    Thank you so much… It works great!!!!

  110. Ram Natraj March 12, 2015 / 6:17 pm

    Kyle, No words to thank you!!!

  111. Ben Jen May 17, 2015 / 4:22 am

    This works perfectly. Thank you for posting this!

  112. Vicio May 21, 2015 / 2:29 pm

    Perfect. Solved. Thank you very much! 🙂

  113. Damian July 16, 2015 / 4:01 pm

    Thank you for keeping this post up. I had to migrate a site and this help a lot.

  114. Mahesh February 17, 2016 / 7:20 pm

    Thanks for writing back.
    Yes, the httpd.conf is located in the C:Program FilesHeliconISAPI_Rewrite3 folder.
    The only thing listed in that file is the lines of code that you posted in the article:
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?p=$1 [NC,L]

    Before I pasted them, it was an empty file.

Leave a Reply

Your email address will not be published. Required fields are marked *