404 error is a common error when accessing WWW websites.
The most common error message: 404 NOT FOUND. The settings of the 404 error page have a great impact on the SEO of the website. Improper settings, such as direct redirection to the homepage, etc., will be demoted and plucked by search engines. The purpose of the 404 page should be to tell the user that the page you requested does not exist, and to guide the user to browse other pages of the website instead of closing the window and leaving. Search engines use HTTP status codes to identify the status of web pages. When a search engine obtains a bad link, the website should return a 404 status code to tell the search engine to abandon indexing the link. If a 200 or 302 status code is returned, the search engine will index the link, resulting in a large number of different links pointing to the same web page content. As a result, search engines’ trust in the website has been significantly reduced.
First open the nginx.conf file and add
(note, include the ;
number) under fastcgi_temp_file_write_size 128k;
Then add the site that needs to be defined inside (the author The file is the lbinin.conf file in the
Add error_page 404 = /404.html;
root /alidata/www/lbinin;
(/404.html means placing the customized 404.html in the server root directory)
Similarly, if you want to add a 403 page, the code is:
error_page 403 = /403.html;
Then save , restart nginx.
/etc/init.d/nginx start/stop/restart/reload
The above introduces the Nginx custom 404 page (configured in Linux environment), including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.For example, start nginx:
/etc/init.d/nginx start
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i
').text(i)); }; $numbering.fadeIn(1700); }); });