Home > CMS Tutorial > WordPress > Why does wordpress appear 404

Why does wordpress appear 404

藏色散人
Release: 2019-07-11 09:12:12
Original
9515 people have browsed it

Why does wordpress appear 404

Why does wordpress appear 404

Often wordpress users have a 404 when the page opens. In this case There are two main reasons: the problem of pseudo-static settings; the server does not support Chinese links. For pseudo-static problems, you can go to WordPress background settings - fixed links to set up. If it still doesn't work, you can contact the server administrator.

WordPress Chinese links will also encounter 404 on some servers, most of which are servers with Windows systems (so we strongly do not recommend using Windows servers, as there are many pitfalls).

To solve this problem, we recommend that you do not choose the article name when setting the fixed link. You can choose to use ID, and manually change the alias for pages, categories, and tags to English letters and numbers, etc.

The more troublesome thing is the tags. Since the number of tags will be relatively large and will increase from time to time, manual modification will be more troublesome. Here are several plug-ins recommended to solve this problem: Auto Tag Slug, IIS Chinese Tag Permalink.

The above is the way to use plug-ins, but since these two plug-ins have not been updated for many years, here is another way to modify the code (modified code will be overwritten by the new version, please check every Pay attention to this issue in the next update). Enter the wp-includes directory, find the class-wp.php file, and find the following code on lines 178 and 182:

Why does wordpress appear 404

##Change line 178 to:

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

Modify line 182 to:

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

Be careful to use professional code editing tools when modifying, such as: Dreamweaver, sublime text, notepad.

For more WordPress technical articles, please visit the

WordPress Tutorial column!

The above is the detailed content of Why does wordpress appear 404. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template