讓WordPress支援中文網址

  1. 找到目錄
1
2

wp-includes/class-wp.php
  1. 搜尋
1
2

$_SERVER['PATH_INFO']
  1. 找到
1
2

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

下方新增

1
2

$pathinfo = isset( $_SERVER['PATH_INFO'] ) ? mb_convert_encoding($_SERVER['PATH_INFO'], "UTF-8", "Big5"): '';
  1. 搜尋
1
2

$_SERVER['REQUEST_URI']
  1. 找到
1
2

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

下方新增

1
2

list( $req_uri ) = explode( '?', mb_convert_encoding($_SERVER['REQUEST_URI'], "UTF-8", "Big5") );

如圖:

test01-e1461682129461