WordPress伪静态IIS规则

2025-11-21 11:39:02

1、今天博客换成了WordPress系统比较顺畅,初步设计页面就是现在的模板,该模板是大侠dafi制作,好了言归正传下面介绍WordPress在IIS下伪静态规则,顺便介绍IIS/Apache/Nginx这三个主流系统的WordPress伪静态规则。

WordPress伪静态IIS规则

2、首先本地调试好所有内容然后上传到服务器,小编使用的是IIS,就以IIS为主介绍吧,其他都差不多通用~~~~~~~~~~~~~

WordPress伪静态IIS规则

3、首先进入首台固定链接设置,然后设置你需要的链接格式,以上是我原先网站的链接格式,经过调试后一切和原先一样。

然后给IIS添加 WordPress IIS伪静态 httpd.ini文件

在httpd目录新建一个httpd.ini文件,然后复制下面的代码进去》保存

WordPress伪静态IIS规则

4、[ISAPI_Rewrite]

 # Defend your computer from some worm attacks

 #RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O] 

# 3600 = 1 hour 

 CacheClockRate 3600 

RepeatLimit 32 

 # Protect httpd.ini and httpd.parse.errors files 

# from accessing through HTTP 

# Rules to ensure that normal content gets through 

 RewriteRule /tag/(.*) /index\.php\?tag=$1 

RewriteRule /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.php 

RewriteRule ^/$ /index.php [L] RewriteRule /(.*) /index.php/$1 [L]

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢