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:

  1. URL rewriting for WordPress on IIS upgraded to version 2.0
  2. Boost your WordPress performance on Windows IIS 6 with FastCGI and eAccelerator in 5 minutes
  3. Permalinks Migration Plugin for wordpress

Related posts:

TAGS: , , , , , , ,


445 Comments »

« Previous4544434241403938...21Next »
Andelia On March 10th, 2010 at 5:57 pm (#)

Hi.I like reading your post , keep doing it.

《创想曲》电子杂志 On March 7th, 2010 at 5:50 pm (#)

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

IIS 下实现 WordPress 伪静态 | 3G新智能网络|nokia|5800|N97|S605th|I8910|X6 On March 2nd, 2010 at 5:09 pm (#)

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

使用wordpress的固定连接 | Just For Lee On March 1st, 2010 at 9:54 pm (#)

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

Yusuf YILMAN On January 31st, 2010 at 6:32 pm (#)

Bu Sorunun Cozumu Aslinda sanildigindanda basit arkadaslar.. bu kadar kodla ugrasmayin. Asagidaki adreste hersey acik acik anlatılıyor.
http://www.yusufyilman.com/wordpress/windows-hosting-de-wordpressdeki-pretty-permalinks-seo-ozelligi-nasil-ayarlanir.html

Yusuf YILMAN On January 23rd, 2010 at 5:24 pm (#)

Bu sorunun &ccedil;&ouml;z&uuml;m&uuml; aslında &ccedil;ok basit bunlarla uğraşmanıza gerek yok arkadaşlar.. Kesin &ccedil;&ouml;z&uuml;m arıyorsanız buraya bakabilirsiniz… : <a href="http://www.yusufyilman.com/wordpress/windows-hosting-de-wordpressdeki-pretty-permalinks-seo-ozelligi-nasil-ayarlanir.html" rel="nofollow">http://www.yusufyilman.com/wordpress/windows-hosting-de-wordpressdeki-pretty-permalinks-seo-ozelligi-nasil-ayarlanir.html</a> Ben kendi sitemde windows host kullanıyorum aynı sorunu bende &ccedil;ektim ama sorunun &ccedil;&ouml;z&uuml;m&uuml; &ccedil;ok basit. Bir<span style="background-color: #fff"> <span>&nbsp;</span><span style="color: #f00">Web.Config</span><span>&nbsp;</span> </span>Dosyası Herşeyi &Ccedil;&ouml;z&uuml;yor. Kısa anlatım <a href="http://www.yusufyilman.com" rel="nofollow">www.yusufyilman.com</a>&nbsp; da Mevcut.

Để không có ký tự tiếng việt ở url wordpress (Nicer permalinks for Vietnamese) | Script Online Collection - Free nulled script - Clone sites On January 23rd, 2010 at 3:01 am (#)

[...] URL Rewriting for WordPress under IIS by Dean Lee [...]

wordpress » XMM.IR On January 20th, 2010 at 6:21 pm (#)

[...] wp_url_rewriting:URL Rewriting for WordPress on Windows IIS : DEAN … [...]

Paul Kiddie’s Blog : Installing Wordpress 2.9.x on an IIS 6.0 web server (Windows Server 2003) and enabling custom permalinks On January 18th, 2010 at 5:52 pm (#)

[...] wp_url_rewriting ISAPI filter from http://www.deanlee.cn/wordpress/url-rewriting-for-wordpress-under-iis/ (currently at version [...]

IIS 下实现 WordPress 伪静态 | 王正东的博客 On January 2nd, 2010 at 11:19 pm (#)

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

« Previous4544434241403938...21Next »

Leave a comment


(will not be published)