Need help writing a rewrite rule please for ISAPI (mod rewrite)

Posted on 2009-02-11
Last Modified: 2012-05-06

I am running Wordpress 2.7 on IIS 6 and my host has installed ISAPI_rewrite by (

I have followed all the links on the Wordpress Blog ( and unfortuantely because I don't have access to php.ini I can't follow that fix so what I have done is added the following lines to a httpd.ini file (see code).

This works fine for posts with the following structure:

and it will rewrite it to the friendly permalink name.

But, pages have the following structure:

and don't rewrite and the permalink gives me a 404

Please please, can somebody provide me with the rewrite rule that I need to have permalinks with pages. I don't mind if I have to have individual rules for each page as I am only going to have 3 or 4 pages ie: -> ->

I have posted this on the Helicon and Wordpress forums and had no reponses so I am turning to my old favourite EE before continuing to tear my hair out.


RewriteRule /([0-9]{4})/([0-9]{1,2})/ /index.php\?year=$1&monthnum=$2 [I,U,O]

RewriteRule /([0-9]{4})/([0-9]{1,2})/(.*)/(feed|rdf|rss|rss2|atom|rss2_comments)/?$ /index.php\?feed=$4&name=$3 [I,U,O]

RewriteRule /([0-9]{4})/([0-9]{1,2})/(.*)/trackback/?$ /wp-trackback.php\?year=$1&monthnum=$2&name=$3 [I,U,O]

RewriteRule /category/(.*)/(feed|rdf|rss|rss2|atom|rss2_comments)/?$ /index.php\?category_name=$1&feed=$2 [I,U,O]

RewriteRule /category/(.*) /index.php\?category_name=$1 [I,U,O]

RewriteRule /author/(.*)/(feed|rdf|rss|rss2|atom|rss2_comments)/?$ /index.php\?author_name=$1&feed=$2 [I,U,O]

RewriteRule /author/?(.*) /index.php\?author_name=$1 [I,U,O]

RewriteRule /([0-9]{4})/([0-9]{1,2})/?(.*) /index.php\?name=$3 [I,U,O]

RewriteRule /feed/(.*) /wp-rss2.php [I,U,O]

RewriteRule /comments/feed/(.*) /wp-commentsrss2.php [I,U,O]

Open in new window

Question by:Hedley Phillips
    LVL 37

    Expert Comment


    so what exactly is the problem, and which rule/s don't do what you want?

    LVL 51

    Assisted Solution

    > ->
    I assume you type in the left URL in the browser and you want the server to deliver the right URL

    RewriteRule ^/\?page_id=85 /history [I,O,U]
    LVL 14

    Accepted Solution

    I managed to get an answer on another forum. The re write rule is as such:

    RewriteRule /history/ /\?page_id=85 [I,L]

    So the other way round.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
    When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now