WordPress在window2003 IIS ISAPI ReWrite下的URL规则
更新时间:2016年1月27日 20:18 点击:1375
为了便于搜索引擎抓取(换句话就是假静态),下面是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
RewriteRule /post/date/([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&page=$3
使用方法(将Wordpres安装在根目录)
去discuz.net的论坛下载Rewrite的压缩包,然后按照安装方法在IIS里面配置好Rewrite,用上面的规则覆盖httpd.ini中原来的内容,再到wordpress的后台,将选项的永久链接部分,使用自定义,然后在框框里面填写上面粗体部分的内容(两种选一种,其中# /post/%post_id%.html还不太完善),即可。
本文引用bluefeel所写的规则。原文中TAG编写有问题,我已经更改完毕,大家要注意写法,否则会影响其他IIS站点目录。
复制代码 代码如下:
[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
RewriteRule /post/date/([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&page=$3
使用方法(将Wordpres安装在根目录)
去discuz.net的论坛下载Rewrite的压缩包,然后按照安装方法在IIS里面配置好Rewrite,用上面的规则覆盖httpd.ini中原来的内容,再到wordpress的后台,将选项的永久链接部分,使用自定义,然后在框框里面填写上面粗体部分的内容(两种选一种,其中# /post/%post_id%.html还不太完善),即可。
本文引用bluefeel所写的规则。原文中TAG编写有问题,我已经更改完毕,大家要注意写法,否则会影响其他IIS站点目录。
相关文章
- 应一个朋友要求写了这个批处理程序,主要用途就是在win32系统中方便停止、开启、重启IIS、MySQL服务。 ...2016-01-27
Windows 2012 r2系统上安装IIS 8.0的方法(图文)
这篇文章主要介绍了Windows 2012 r2系统上安装IIS 8.0的方法(图文),需要的朋友可以参考下...2016-01-27win2003 iis 不支持请求(iis iso)的解决方法分析
今天有网友说,本站提供的文件无法下载,我看了一下,是iso文件,访问时提示不支持请求,原来iis默认不支持一些格式的下载,下面是通用的解决思路。...2016-01-27Windows 2008 R2 下IIS7.5+PHP5.2环境配置(FastCgi设置)
这篇文章主要介绍了Windows 2008 R2 下IIS7.5+PHP5.2环境配置(FastCgi设置),需要的朋友可以参考下...2016-07-04win2003+IIS服务器下运行ASP+ACCESS非常慢的解决方法
win2003+IIS上运行ASP+ACCESS,非常缓慢,只要运行=now()都非常慢,同样的问题,有很多朋友遇到,下面与大家分享下正确的解决方法...2016-01-27- IIS不支持UrlRewrite。 所以我们需要通过安装第三方服务器扩展让IIS支持UrlRewrite。 目前有一种产品能比较好地支持IIS的UrlRewrite,名字叫ISAPI_Rewrite。...2016-01-27
- 这篇文章主要介绍了WIN2003 IIS相关错误的解决方法的相关资料,非常不错,具有参考借鉴价值,感兴趣的朋友一起看看吧...2016-11-01
win2000 IIS支持shtml shtm的设置方法 原创
win2000和win2003支持shtml的设置方法...2016-01-27- Win2003 IIS6.0性能优化篇,从网站找一些常见的优化方法,大家可以参考下。...2016-01-27
- 本功能对服务器环境有特殊要求,独立主机用户需要对 Web 服务器增加相应的 Rewrite 规则,因此需要服务器权限才可使用...2016-01-27
阿里云云服务器Windows 2008下IIS添加网站绑定域名图文教程
这篇文章主要介绍了阿里云云服务器Windows 2008下IIS添加网站绑定域名图文教程,需要的朋友可以参考下...2016-01-27- 在Windows下用IIS配置JsP的方法。...2016-01-27
IIS6下PHP的ISAPI和FastCGI性能比较 期待ii7
在Windows IIS 6.0下配置PHP,通常有CGI、ISAPI和FastCGI三种配置方式,这三种模式都可以在IIS 6.0下成功运行,下面我就讲一下这三种方式配置的区别和性能上的差异。...2016-01-27- 这篇文章主要介绍了Windows Server 2012 R2NT6.3IIS8.5中安装IIS和FTP的方法,需要的朋友可以参考下...2016-01-27
- 我们一般将Tomcat与Apache或IIS配合使用,让Apache对网站的静态页面请求提供服务,而Tomcat作为专用的JSP引擎,提供JSP解析,以得到更好的性能。 ...2016-01-27
- 由于win2003的稳定性与良好软件的支持性受到很多朋友的亲睐,由于php管理系统成为主流,所有php的支持也是必备的了,一般也不用使用linux系统,除非你的网站很大了,一般window够了,100万ip也不是问题...2016-01-27
ASP.NET Process Model之一 IIS 和 ASP.NET ISAPI
我觉得这个问题涉及到IIS和ASP.NETASP.NET Runtime的处理模型的问题,并不是三言两语就能说清楚的,所以决定写这样一篇介绍IIS和ASP.NET Runtime Process Model的文章,谈谈我对此的一个粗浅的认识,如果有什么不对的地方,希望大家及时指正。...2016-01-27- [标签:特殊页filename]...2016-01-27
- 这篇文章主要为大家详细介绍了Windows7下IIS+php配置教程,具有一定的参考价值,感兴趣的小伙伴们可以参考一下...2017-07-06
Win2003 R2 SP2 64位服务器系统 配置PHP+IIS6
最近一直在为服务器上的论坛头大,我的论坛用的是Discuz X2,系统是Windows2003 R2 SP2 64位,使用FASTCGI +IIS+PHP的运行环境...2016-01-27