wp_url_rewriting:URL Rewriting for WordPress under IIS (V 2.1)

This ISAPI filter removes the index.php from WordPress permalinks on Windows IIS,making your permalinks more pretty and SEO friendly.

Because IIS does not support mod_rewrite module for rewriting URLs, if you are running WordPress on Windows IIS,whenever you try to use Permalinks, you always get something like this:

http://www.yourdomain.com/index.php/2006/09/02/…../

this ISAPI filter can remove ugly "index.php" from the URL automatically.it’s easy to use,just install it and no further configuration is necessary.

download wp_url_rewriting

Key benefits:

  • Speed.

    this URL Rewriting engine is writing in C++,because it’s designed dedicated for WordPress,so the program’s logic is very simple and no regular expression is used.it’s extremely faster than other rewriting engines on the IIS platform.
  • Support Multiple WordPress sites on one server.
  • No configuration is needed

    This URL Rewriting engine will automatically detect all WordPress sites on your server,and generate URL rewriting rules for each of them.

Living Demo

You can take my site as a living demo, navigate through my sites,watch the ‘pretty’ address in the browser.

Limitation

You must have administrator privileges on the target server in order to install this plugin.

Installation

1). Copy wp-url-rewriting.dll to the target machine and register it as an ISAPI filter using IIS MMC snap-in. wp-url-rewriting.dll can be registered at either the site level or the global level.Note:if WordPress is not installed in the root directory of your site,you should setup it as a virtual directory.

2). after register,Login to your WordPress admin panel->options->Permalinks,make sure you have removed the index.php from your permalink structure.

3). Do a little hack to WordPress file ‘link-template.php’ to make paging works well for categories:(NOTE: You don’t need to do this step if you are using WordPress 2.3.0 or newer)

open file /wp-includes/link-template.php and find the following code:

function get_pagenum_link($pagenum = 1) {

 global $wp_rewrite;

 $qstr = $_SERVER['REQUEST_URI'];

 $page_querystring = "paged";

 ...

}


Replace it with:

function get_pagenum_link($pagenum = 1) {

 global $wp_rewrite;

 $qstr = $_SERVER['PATH_INFO'];

 $page_querystring = "paged";

 ...

}

Revision History

  • version 2.1 -2007-8-29
    • Fixed a bug that may cause rewriting failed if there are many blogs under a single site.
  • version 2.0 -2007-8-17
    • no configuration file needed.This version automatically generate URL rewriting rules for each WordPress sites on the same server.
    • Support multiple WordPress sites on the same server.you can install this filter at the global level to support multiple WordPress sites on your server.
  • version 1.1 - 2006-11-1
    • optimize algorithm.
    • exclude directories : wp-admin,wp-content from the url rewriting rules.
  • version 1.0 - 2006-9-2
    • Initial Version

this ISAPI filter has been build with /MT switch(multithread, static CRT) ,if you failed to load this plugin,download vcredist_x86.exe from microsoft,run it on the target computer,this installs all Visual C++ libraries as shared assemblies.

Please feel free to report any bugs.

This project is licensed under GNU General Public License 2.0.

Related posts:

TAGS: , , , , , , ,


472 Comments »

« Previous4847464544434241...21Next »
Kossi On December 17th, 2011 at 10:49 pm (#)

http://wordpress.org/extend/plugins/isapi-rewriter/

Rob James On August 26th, 2011 at 12:59 am (#)

Thanks! Worked great on Server 2003 R2 SP2 IIS6. I put it in the PHP directory and then in IIS added the DLL under ISAPI Filters. Even though it does not remove the actual /index.php/ from the radial buttons in WP. . . under Permalink Settings you can check Custom Structure and put in folder variations like /%category%/%postname%. Which will work. Note: /%category%/%postname%.php will not work on the posts, but rather gives you 404 errors. The DLL more than likely does not handle this rare custom structure when one wants their posts to be page extensions like php or such. I am just glad I knew about custom structure, hence my post to help others thinking this does not work on their server. Just be creative and it will work! Plus check your pages and posts to make sure your site is building correct for you and your GOLDEN! Thanks again for the filter.

Senior Financial Group, Inc. On July 10th, 2011 at 4:22 am (#)

Wordpress is a wonderful business tool who's power and usefulness keeps growing.  Great Job!

wlcjq On June 27th, 2011 at 11:40 am (#)

http://setup8.com/search?cx=015559507178436215641%3Axyerb810urw&cof=FORID%3A10&q=Inno&x=0&y=0&siteurl=setup8.com%2F
 
不知道作者是否还在更新,报告一个bug,如果连接中含有第二个本站网址,就会出现404
PS:wp_url_rewriting 非常好用,感谢!

notebok On April 7th, 2011 at 8:25 pm (#)

thank posts and wordpress works fine but BuddyPress pages cannot be found.

Dave James On January 24th, 2011 at 2:47 am (#)

thanks very much for this isapi extension - has saved me hours of hair pulling! Muchos appreciato..

Camping Checklist On January 23rd, 2011 at 10:09 pm (#)

like mentioned, does not work for BuddyPress

IIS 下实现 WordPress 伪静态 | 炫丽小窝 On January 7th, 2011 at 12:41 pm (#)

[...] wp_url_rewriting:URL Rewriting for WordPress under IIS [...]

STEVE LIGHT On December 13th, 2010 at 6:20 pm (#)

STEP1: Copy wp-url-rewriting.dll to the target machine and register it as an ISAPI filter using IIS MMC snap-in. wp-url-rewriting.dll can be registered at either the site level or the global level.Note:if WordPress is not installed in the root directory of your site,you should setup it as a virtual directory.
Please can you explain in layman's terms? I haven't got a clue what you are talking about. :-)

Thanks
Steve 

IIS WordPress URL Rewrite « David Tosoff dot com On October 7th, 2010 at 5:18 pm (#)

[...] zero-config DLL that rewrites the “index.php” portion of your WordPress addresses. http://www.deanlee.cn/wordpress/url-rewriting-for-wordpress-under-iis/ :iis, isapi, url rewriting, [...]

« Previous4847464544434241...21Next »

Leave a comment


(will not be published)