分类分类
更新时间:2026-09-29 21:11:49作者:fang
本文主要讲解WordPress博客在Win空间上实现伪静态的方法:
1、写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 throughRewriteRule /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]
2、如果博客地址含有中文,或标签是中文的,就会转到404页面,是通过httpd.ini解决不了的,必须来修改源代码。
修改网站目录下wp-includes/class-wp.php文件(请先行备份):
第一步:找到
$pathinfo = $_SERVER['PATH_INFO'];
修改为
$pathinfo = mb_convert_encoding($_SERVER['PATH_INFO'], ‘UTF-8′, ‘GBK’);
第二步:找到
$req_uri = $_SERVER['REQUEST_URI'];
修改为
$req_uri = mb_convert_encoding($_SERVER['REQUEST_URI'], ‘UTF-8′, ‘GBK’);
就这样,中文的TAG标签页等都可以打开了的。
以上就是关于WordPress博客在Win空间上实现伪静态的方法,希望对大家有所帮助。
相关
超时空街球对决体育竞技1.35Gv1.72026-09-29
下载内蒙古农商手机银行金融理财162.14 MBv3.1.92026-09-29
下载爆射奇兵0.1折版角色扮演128.48 MBv1.0.安卓版2026-09-29
下载剑气除魔0.1折版策略游戏13.6 MBv1.0.02026-09-29
下载口袋喵喵策略游戏13.67 MBv1.0.02026-09-29
下载御龙城堡传奇手游策略游戏180.89 MBv1.0.22026-09-29
下载菲尼西雅战记策略游戏164.4 MBv1.2.12026-09-29
下载鏖战三国0.05折版角色扮演13.66 MBv1.0.02026-09-29
下载群英争雄策略游戏1007.72 Mv1.0.12026-09-29
下载梦漫app资讯阅读43.14 Mv1.0.12026-09-29
下载点点大作战经营养成623.91 Mv2.6.2002026-09-29
下载妖怪名单角色扮演13.64 Mv1.0.02026-09-29
下载







