首页 > 服务器 > Win服务器 > 正文

WordPress在window2003 IIS ISAPI ReWrite下的URL规则

2024-09-10 00:05:56
字体:
来源:转载
供稿:网友
为了便于搜索引擎抓取(换句话就是假静态),下面是URL ReWrite的规则,效果看我的chinadigger的链接地址。我目前的Rewrite规则: 
代码如下:
[ISAPI_Rewrite] 

# 3600 = 1 hour 
CacheClockRate 3600 

RepeatLimit 32 

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

RewriteRule /tag/(.*)/ /index/.php/?tag=$1 
RewriteRule /(about-me|about-copyright|guest-book)/ /index/.php/?pagename=$1 
RewriteRule /author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed/.php/?author_name=$1&feed=$2 
RewriteRule /author/?(.*) /index/.php/?author_name=$1 
RewriteRule /feed/?$ /wp-feed/.php//?feed=rss2 
RewriteRule /comments/feed/?$ /wp-feed/.php//?feed=comments-rss2 
RewriteRule /page/(.*)/ /index/.php/?paged=$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] 

# /%year%%monthnum%%day%/%postname%/ 

RewriteRule /category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed/.php/?category_name=$1&feed=$2 
RewriteRule /category/?(.*)/ /index/.php/?category_name=$1 

RewriteRule /([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 /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index/.php/?year=$1&monthnum=$2&day=$3&page=$4 
RewriteRule /([0-9]{4})/([0-9]{1,2})/?$ /index/.php/?year=$1&monthnum=$2&page=$3 

RewriteRule /([0-9]{4})([0-9]{1,2})([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /index/.php/?year=$1&monthn&day=$3&name=$4&feed=$5 
RewriteRule /([0-9]{4})([0-9]{1,2})([0-9]{1,2})/([^/]+)/trackback/?$ /wp-trackback/.php/?year=$1&monthnum=$2&day=$3&name=$4&tb=1 

# /post/%post_id%.html 

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

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 /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 
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表