wordpress关于win主机伪静态处理方案
此文章只针对wordpress博客学习者 (其他的我尚未测试) 如果你是高手或已真(伪)静态的请略过,如果你的主机是win主机还不能伪静态 那么这篇文章可以帮到你,其实我也是菜鸟一个、刚开始也苦于百度寻找内容,然后也在露兜博客中学到很多知识。
网上关于wp伪静态的内容太多了,可能有些人看的越多忙的越多反而效果没见着。
其实也很简单的两步:
1.新建文本 复制以下代码:
[ISAPI_Rewrite]
# 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 /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]
命名为 httpd.ini 类型所有文件;然后上传至空间根目录即可(即wp程序文件夹)
2.登录后台找到设置 自定义固定连接(下面参考) :
/%category%/%postname%.html (分类/日志名.html)
/%category%/%postname%.htm(分类/日志名.htm)
/%postname%.html(/日志名.html)
/%postname%.htm(/日志名.htm)
/%post_id%.html(/日志id号.html)
/%post_id%.htm(/日志id号.htm)
然后保存 看看你的文章是否伪静态了
提示: 页面需要把中文标题改成拼音或者英文 。