WordPress Chinese tags generally don’t cause 404 errors on Linux, but on Windows systems, this issue can occur. It’s something you’ll just have to fix! This VPS guide site has been upgraded to the latest WordPress version 4.1, while most search results still refer to version 3.0, and the code has changed since then. The fix is still possible — just a small code modification. However, it’s strongly recommended to back up the original files before making any changes!
First, locate the file: wp-includes -> class-wp.php in your WordPress directory, then make the following changes to resolve the issue where some Chinese tags cannot be opened on Windows systems.
wp-includes/class-wp.php line 153:
$pathinfo = isset( $_SERVER['PATH_INFO'] ) ? $_SERVER['PATH_INFO'] : '';
Change to:
$pathinfo = isset( $_SERVER['PATH_INFO'] ) ? mb_convert_encoding($_SERVER['PATH_INFO'],'utf-8', 'GBK') : '';
wp-includes/class-wp.php line 157:
list( $req_uri ) = explode( '?', $_SERVER['REQUEST_URI'] );
Change to:
list( $req_uri ) = explode( '?', mb_convert_encoding($_SERVER['REQUEST_URI'], 'utf-8','GBK') );
Be sure not to use Notepad for editing. Back up all your data before making changes, just in case! And with that, the Chinese tags on VPS Guide site are working again!
Friendly reminder: It’s best to save a copy of the code for future upgrades, since upgrading will revert it. Also, this method is not suitable for WordPress versions below 4.0. VPS Guide does not recommend using older versions either — after all, the latest release has already fixed some existing bugs!