讓WordPress支援中文網址

  1. 找到目錄
    wp-includes/class-wp.php
  2. 搜尋
    $_SERVER['PATH_INFO']
  3. 找到
    $pathinfo = isset( $_SERVER['PATH_INFO'] ) ? $_SERVER['PATH_INFO'] : '';

    下方新增

    $pathinfo = isset( $_SERVER['PATH_INFO'] ) ? mb_convert_encoding($_SERVER['PATH_INFO'], "UTF-8", "Big5"): '';
  4. 搜尋
    $_SERVER['REQUEST_URI']
  5. 找到
    list( $req_uri ) = explode( '?', $_SERVER['REQUEST_URI'] );

    下方新增

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

如圖:

test01-e1461682129461



這裡的資訊對您有用嗎?歡迎斗內給我