httpd.ini怎么写,就不说了,网上一搜一大堆,基本上都是一样的,都可以的。一般标准模板都是:
# 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 /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]
主要是如果连接中含有中文的话,就会转向到404页面,是通过httpd.ini解决不了的,我们必须来修改源代码。
修改网站目录下wp-include/classes.php文件(请先行备份):
(最新3.1/2版需要修改的文件是wp-include/class-wp.php)
第一步:找到
$pathinfo =
$_SERVER[‘PATH_INFO’];
修改为
$pathinfo =$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标签页等都可以打开了的。
方法很好!值得学习!
谢谢你的分享!
支持博主~加油!
文章不错!学习下!
帮你顶下~!