wordpress伪静态
现在对于win2003的服务器,一般主流空间商装的都是iis6.0的web服务器,一般很多初级用户都会认为win主机支持php伪静态不太好,其实不是,是很多人不明白怎么设置罢了,比如:wordpress如何在win系统下实现伪静态,下面详细给大家说下:
首先你先问你空间商,你购买的空间支持不支持伪静态,一般购买的付费空间/虚拟主机都是支持的。如果支持的话,就创建一个httpd.ini文件 ,把下面代码保存到该文件中,上传到网站的根目录就可以了。然后,之后进入wp后台修改固定链接,比如修改为:/%category%/%post_id%.html ,很简单吧。
[isapi_rewrite]# defend your computer from some worm attacks#rewriterule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [f,i,o]# 3600 = 1 hourcacheclockrate 3600repeatlimit 32# protect httpd.ini and httpd.parse.errors files# from accessing through http# rules to ensure that normal content gets throughrewriterule /tag/(.*) /index\.php\?tag=$1rewriterule /software-files/(.*) /software-files/$1 [l]rewriterule /images/(.*) /images/$1 [l]rewriterule /sitemap.xml /sitemap.xml [l]rewriterule /favicon.ico /favicon.ico [l]# for file-based wordpress content (i.e. theme), admin, etc.rewriterule /wp-(.*) /wp-$1 [l]# for normal wordpress content, via index.phprewriterule ^/$ /index.php [l]rewriterule /(.*) /index.php/$1 [l]
这个规则文件的写法是iis6.0下最新的wordpress伪静态规则。一般win主机都是iis6.0的web服务器 ,而不是apache的,在iis服务器下,像一些常见的wordpress博客、shopex网店系统等第三方知名第三方程序,伪静态的实现,自己只需要把网站的静态化规则文件命名为httpd.ini文件放在网站根目录就可以了,无须通过网站后台设置,那是在linux系统下的apache服务器下才那样设置的。