Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall
When you see this title, you may have two questions: 1, why do you want to define a 404 page, wordpress template is not a 404.php to deal with the page does not exist? What I want to say is that this 404 page is really convenient, but when your site is done for a long time, It is likely to appear a large number of 404 pages, such as the former is to do a Web site for information, when the revision of WordPress blog, there will be a large number of 404 pages, and search engines will continue to visit these non-existent pages, which increased the burden on the server, Using htaccess to customize a static 404 page can solve this problem. 2, the use of htaccess custom WordPress 404 page that is not easy, directly in the htaccess file add code errordocument 404/404.html, and then a new 404.html file uploaded to the root directory OK. But this method is not feasible, because the default rewrite rule is to point all the requests to the index.php script, including, of course, nonexistent pages, if you add the normal 404 Page setup code, will not have any effect. Say so much, I believe you already understand why to customize a 404 page for WordPress. Here's how to customize 404 pages.
1, the first step of course is to create a 404.html file, and upload to the site root directory
2, delete the original rewrite rule file htaccess, add the following rules below.
# BEGIN WordPress errordocument 404/404.html rewriteengine on Rewritebase/rewriterule ^archives/.*$/index.php [L] Rewriterule ^feed.*$/index.php [l] rewriterule ^page/.*$/index.php [l] rewritecond%{request_filename}!-f RewriteCond% {request_filename}!-d # End WordPress
Archives is the URL format of the article, such as/ARCHIVES/88, can be modified according to their actual article URL. If your blog is installed in the WordPress directory, you must add Rewriterule ^wordpress/.*$/index.php [L] in the back.
Article Original start: http://www.leicheng.net/use-htaccess-customize-wordpress-404/