Win主机怎么设置WordPress固定连接?IIS设置WordPress伪静态规则教学

WordPress是一款PHP程序,所以运行程序就是支持PHP的软件环境,常见的有LNMP,LA

Win主机怎么设置WordPress固定连接?IIS设置WordPress伪静态规则教学

WordPress是一款PHP程序,所以运行程序就是支持PHP的软件环境,常见的有LNMP,LAMP等等,但是许多新手同学使用的是Windows主机,这里不推荐大家使用win主机来运行wordpress,因为在后面你会发现各种蛋疼的情况,各种发生在win主机上的不明错误,会很生气的,所以如果你是新站,条件充裕的情况下你可以更换成linux的主机,本站的所有推广主机都是支持的,并且效果还不错哦。
当然,你非要使用Win主机来使用WordPress也不是不可以,那么今天就告诉大家,如何在Win主机上使用WordPress是的固定连接,并且设置固定连接之后不出现404错误。
首先,找到你主机的http.ini文件,将以下代码复制并且保存到这文件中,不知道http.ini在哪儿,如何启用http.ini的请自行百度。
[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]
好了,非常简单的WordPress教程,你会了吗?

作者: liuzhihao

为您推荐

返回顶部