文章评分 次,平均分 :
WordPress是一款PHP程序,所以运行程序就是支持PHP的软件环境,常见的有LNMP,LAMP等等,这里不推荐大家使用win主机来运行wordpress,因为在后面你会发现各种情况,各种发不明错误,所以如果你是新站,条件充裕的情况下你可以更换成linux的主机。
当然,你非要使用Win主机来使用WordPress也不是不可以,那么今天就告诉大家,如何在Win主机上使用WordPress是的固定连接,并且设置固定连接之后不出现404错误。
首先,找到你主机的http.ini文件,将以下代码复制并且保存到这文件中,不知道http.ini在哪儿,如何启用http.ini的请自行百度。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | [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] |
除特别注明外,本站所有文章均为小浩博客原创,转载请注明出处来自https://www.xhsay.com/wordpress-iis-rewrite.html
用WIN主机跑WordPress,感觉真的很不爽,个人不太建议用WIN主机跑 WordPress
@boke112导航Linux玩的不溜~