wordpress中文路径出现404错误的解决办法

第一步

wp-includes/class-wp.php 165 行:

$pathinfo = isset( $_SERVER['PATH_INFO'] ) ? $_SERVER['PATH_INFO'] : '';

修改为:

$pathinfo = isset( $_SERVER['PATH_INFO'] ) ? mb_convert_encoding($_SERVER['PATH_INFO'],'utf-8', 'GBK') : '';

第二步

wp-includes/class-wp.php 170 行:

 list( $req_uri ) = explode( '?', $_SERVER['REQUEST_URI'] );

修改为:

list( $req_uri ) = explode( '?', mb_convert_encoding($_SERVER['REQUEST_URI'], 'utf-8','GBK') );

下载仅供下载体验和测试学习,不得商用和正当使用。

下载体验

请输入密码查看下载!

如何免费获取密码?

点击下载

评论