请跟我一起拍死wordpress 2.2的作者,这丫的把2.1.x版本的category/和pagename/后面的斜杠给去掉了,导致我原来的rewriterule大部分失效,汗,顺便修正一下,把规则发上来
修正一个page分页的问题,感谢Sunya的指出

使用方法:
1.在Wordpress后台的永久链接处,选择自定义,然后使用自定义格式/post/%post_id%.html
2.给IIS加载URL_Rewrite模块,然后httpd.ini中的内容使用下面的内容即可


[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP

# # WordPress rewrite rules# /post/%post_id%.html

RewriteRule /tag/(.*) /index.php?tag=$1

RewriteRule /(about-copyright|favor|archives|tags) /index.php?

pagename=$1

RewriteRule /post/category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?

category_name=$1&feed=$2

RewriteRule /post/category/?(.*) /index.php?category_name=$1

RewriteRule /author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?

author_name=$1&feed=$2

RewriteRule /author/?(.*) /index.php?author_name=$1

RewriteRule /rss.xml /wp-feed.php/?feed=rss2

RewriteRule /feed/?$ /wp-feed.php/?feed=rss2

RewriteRule /comments/feed/?$ /wp-feed.php/?feed=comments-rss2

RewriteRule /([0-9]+)/?([0-9]+)?/?$ /index.php?p=$1&page=$2

RewriteRule /post/([0-9]+).html /index.php?p=$1 [I]

RewriteRule /page/(.*) /index\.php\?paged=$1

RewriteRule /post/date/([0-9]{4})([0-9]{1,2})([0-9]{1,2})/([^/]+)/?([0-9]+)?/?$

/index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5

RewriteRule /post/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index.php?

year=$1&monthnum=$2&day=$3&page=$4

RewriteRule /post/date/([0-9]{4})/([0-9]{1,2})/?$ /index.php?

year=$1&monthnum=$2&page=$3

RewriteRule /post/([0-9]+).html/(feed|rdf|rss|rss2|atom)/ /index.php?

feed=rss2&p=$1

RewriteRule /post/([0-9]+).html/trackback/ /wp-trackback.php?p=$1

RewriteRule /photo/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?$ /wp-

content/plugins/fgallery/fim_photos.php?$1=$2&$3=$4 [QSA,L,I]

RewriteRule /photo/?(.*) /wp-content/plugins/fgallery/fim_photos.php?

$1=$2&$3=$4 [QSA,L,I]

其中包含了自定义页面规则,日志分类规则,日志规则,feed规则,trackback规则,如果忘了什么,请参照自行添加

8 条评论...

  1. Sunya

    :em05: 甜蚂蚁,你的显示摘要跟继续阅读怎么弄的啊啊,很不错,写写教我吧。:)

    [回复]

  2. 甜蚂蚁

    这个是个插件,AJAX什么 Expand Now的

    [回复]

  3. Sunya

    :em07: 我去找找,嘿嘿嘿嘿,你的首页翻页的怎么无效,浏览着你的文章,好文章真多,收藏咯!那个Beautifier download插件mail个给我吧,我去他的主页找了半天找不到,下载连接失效了!

    [回复]

  4. 甜蚂蚁

    Rewrite Rule错了,谢谢谢谢指出,马上去修正咯

    [回复]

  5. 甜蚂蚁

    说了半天,没留邮件地址,让我mail到哪儿,汗

    [回复]

  6. Sunya

    isunya#gmail.com
    呵呵,谢谢谢谢咯!

    安装了ajaxified-expand-now插件后在Google webmaster tool管理里会显示robots.txt 的限制,不知道是甚么原因。呵呵。

    [回复]

  7. 电子商务博客 » wordpress 2.2的Url Rewrite规则

    [...] 我找的Url Rewrite规则来自甜蚂蚁的部落格,根据我的情况我自己修改了一下,内容如下代码问题,其中红色部分是我的url自定义结构。 [...]

    [回复]

  8. 海豚

    给你顶一个.
    继续溜达一下你的博客

    [回复]

不想写点什么?