wordpress win IIS伪静态规则

使用的固定链接格式是:
/%postname%.html

用别名做url有利于seo
#Wordpress
RewriteRule /tag/(.*) /index.php?tag=$1
RewriteRule /(about|contact|about-copyright|favor|archives|tags|sitemap)/ /index.php?pagename=$1
RewriteRule /category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?category_name=$1&feed=$2
RewriteRule /category/?(.*) /index.php?category_name=$1
RewriteRule /category/(.*)/page/(.*) /index.php?category_name=$1&paged=$2
RewriteRule /author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed.php?author_name=$1&feed=$2
RewriteRule /author/?(.*) /index.php?author_name=$1
RewriteRule /feed/?$ /index.php/?feed=rss2
RewriteRule /comments/feed/?$ /index.php/?feed=comments-rss2
RewriteRule /page/(.*) /index.php?paged=$1
RewriteRule /([^/]+)/?([0-9]+)?.html/?$ /index.php?name=$1&page=$2
RewriteRule /?$ /index.php?page=$1
RewriteRule /([^/]+).html/(feed|rdf|rss|rss2|atom)/?$ /index.php?name=$1&feed=$2
RewriteRule /([^/]+).html/trackback/?$ /wp-trackback.php?name=$1&tb=2

部分翻页的伪静态规则可能遗漏,可以按照上面的自行添加

发表评论

电子邮件地址不会被公开。 必填项已用*标注