Godaddy space wordpress Chinese tag 404 error

Source: Internet
Author: User
Tags php file php tutorial

Solution 1

First, open wp-PRODES/class-wp.php first if you don't find out, maybe you are 2. in version x, which is a class. php, occasionally intoxicated here 3. version x prevails...

Second, you can find 147th rows. Of course, if you are afraid of trouble, you can also search for the following lines.

The code is as follows: Copy code

$ Req_uri = $ _ SERVER ['request _ URI '];

Then change this line

The code is as follows: Copy code

$ Req_uri = $ _ SERVER ['unencoded _ url'];

Save and exit... In this way, we are done ~


Solution 2

1. If you have modified classes. php in the wp-pair des directory, you can access the Chinese tag normally.
About 140 lines of code

The code is as follows: Copy code
$ Pathinfo = $ _ SERVER ['path _ info'];
Replace:
$ Pathinfo = mb_convert_encoding ($ _ SERVER ['path _ info'], "UTF-8 & Prime;," GBK ");
Set
$ Req_uri = $ _ SERVER ['request _ URI '];
Replace:
$ Req_uri = mb_convert_encoding ($ _ SERVER ['request _ URI '], "UTF-8 & Prime;," GBK ");

Then you just need to modify the link-template.php file in the wp-Des Directory (around 1425 lines)
Set

The code is as follows: Copy code
$ Result = $ base. $ request. $ query_string;
Replace
$ Result = $ base. mb_convert_encoding ($ request, 'utf-8', 'gbk'). $ query_string;

In this way, the replaced tag page contains Chinese characters and does not comply with url standards, which is not conducive to seo/seo.html "target =" _ blank "> Search engine indexing

Note that some friends say they use pseudo-static instances. This is also acceptable. I will not introduce them here. You can go to the php Tutorial channel to view them.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.