说说IIS下wordpress静态化(永久链接)的实现(二)

2007年9月18日 | 分类: IT

  哈哈,二十多天过去了,才想起来写,前文用了WordPress URL Rewrite来实现IIS下wordpress静态化(永久链接)处理,刚刚发现在WordPress最新的SVN中,wp-settings.php这个文件有了一些变化,详细查了一下,是因为如下原因:

版本: 5889
作者: markjaquith
日期: 11:32:19, 2007年8月17日
信息:
Set REQUEST_URI for IIS in more situations.  props snakefoot.  fixes #3514
—-
已修改 : /trunk/wp-settings.php

作者对IIS的REQUEST_URI做了细化,但这样一来,WordPress URL Rewrite这个模块就没法用了,会导致首页不停地刷新,至少在我儿是这样,不过还好,我们还有wp_url_rewriting
这个模块我年初并没有用,当时只是1.1版,也需要配置,不过到了现在的2.1版,变化很大,最大的好处就是免配置,不需要配置文件了,直接IIS里加载就可以,很是方便。官网介绍如下:

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.

我就不翻译了,本人现在已经改用这个,一切正常。

前两天看见论坛里的帖子,说是很多人用了Wordpress来搭建自己的博客后,内容都围绕着Wordpress,这也无可厚非,我想说的是,Wordpress只是个发表言论的工具,还有更多方方面面的东西可以去留心,发表、交流,本末倒置不可取。

  1. 2007年12月19日12:19

    谢谢,我试试,我遇到的就这个问题啊。不知道是个什么插件呢,您还卖关子,呜呜,不过真的感觉是有办法的了。

  2. 2007年12月19日12:54

    我在那个link-template.php 文件下面没找到你提到的博客里面的那个改代码的,呜呜,2.3.1版本的WP …..