WordPress在win主机下用httpd.ini设置固定链接实现伪静态方法

转自点点 13 年前 回复

, , , , ,

首页你的主机要装Rewrite 组件,现在国内很多WINDOWS主机都有装这个了。然后在httpd.ini 中加入如下代码:

    [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]

然后在固定链接中设置为自己想要的就可以了,经过大家的测试都没有错误。

支付宝打赏微信打赏

如果此文对你有帮助,欢迎打赏作者。

发表评论

欢迎回来 (打开)

(必填)