WordPress伪静态IIS规则
1、今天博客换成了WordPress系统比较顺畅,初步设计页面就是现在的模板,该模板是大侠dafi制作,好了言归正传下面介绍WordPress在IIS下伪静态规则,顺便介绍IIS/Apache/Nginx这三个主流系统的WordPress伪静态规则。
2、首先本地调试好所有内容然后上传到服务器,小编使用的是IIS,就以IIS为主介绍吧,其他都差不多通用~~~~~~~~~~~~~
3、首先进入首台固定链接设置,然后设置你需要的链接格式,以上是我原先网站的链接格式,经过调试后一切和原先一样。然后给IIS添加 WordPressIIS伪蚜扪裎风静态httpd.ini文件在httpd目录新建一个httpd.ini文件,然后复制下面的代码进去》保存
4、[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]