A lot of websites inexplicably fall right, however cannot find the reason where. Neither cheating nor optimization over, but by the search engine "mishaps" blocked. So what caused it? We're talking about it from 404. For the novice webmaster may not know what is 404 pages, not to understand 404 errors, the following content we further analysis.
One: About HTML s
After the Typecho framework is deployed, access the internal page 404 error.
Web server Nginx
Nginx Configuration
# you could add here your# server {# ... #}# statements for each of the your virtual hosts to this file### your should look at The following URL ' s in order to grasp a solid understanding# of Nginx configuration files in order to fully unleash the P Ower of nginx.# http://wiki.nginx.org/Pitfall
Recently a TP5 project said put to Nginx under the test to see, download a phpstudy, put to the WWW, configure a good domain name, directly to the newspaper a 404;
Workaround:
1. First in the Phpstudy under the configuration of the domain name directory point under the project under public;
2. Copy the following code into the Nginx/conf/vhost file:
Location/{Index index.html index.htm index.php;#autoindex on;if (!-e $request _filename) {Rewrite ^
1) do not place jump code on the 404 page to avoid affecting the overall view of the website by the search engine!I have done a test, that is, using two websites to check whether the jump code on the 404 error page has any impact on the search engine, the result is that the website does not place jump code on the 404
One day after the VPS was changed, Google Administrator tool under the console to see a lot of "soft 404" error, looked for some data found that it is under the Nginx to configure the 404 page of the method does not lead to the error of the production, this record nginx under the correct
# 404.php, 8/10/2000.
# Traps 404 Errors and mails a notice to the webmaster.
# Requires PHP 3.0 or newer, and mail capability on your system.
#
# Copyright Shaun@shat.net under the GNU public License.
# disclaimer:i wrote this script for me, and it works for me.
# If it doesnt work for you, or makes your server explode,
# thats life. Please email with questions or bug reports.
# Set These variables to con
)
$ Textcolor = "#000000 ";
# This script is capable of mailing the details of each 404 error# To the webmaster. Use the $ reportlevel variable to control when# You receive these reports.##0 = dont use the email capabilities at all#1 = send email only if the errors referer contains your domain name# (I. e. the 404 was generated by a broken link on your site)#2 =
The default 404 error page is not very friendly to visitors and search engines. it takes some time to set error prompt pages such as 404 on the server to better retain visitors. As the one-click installation package of LNMP. ORG does not provide error messages such as
The 404 page tells the search engine that the page does not exist, and also prompts users to select other operations. next I will introduce php custom 404 to my friends who do not have apache operation permissions.
The 404 page tells the search engine that the page does not exist and also prompts you to select other operations, next, I will introduce my friends w
Configure custom 404 error page Steering in Nginx environment to avoid displaying blunt, unfriendly error messages to users. You can give the following hint: Sorry, the page you visited does not exist or has been deleted.Precautions:
A, do a backup before modifying nginx.conf to avoid problems.
① first c
Using the PHPheader () function to implement the 404 error prompt function on the page, we have sorted out the detailed usage of the PHPheader () function and shared it with you. We need a lot of support. If you are just learning PHP, many functions may need to be studied. Today we will learn how to use PHP Header (). For more instructions, please refer to the PHP Chinese manual, the following describes how
404 page is a tell the search engine this page does not exist, but also prompted the user can choose other operations, below I give no Apache operation rights to introduce a friend PHP custom 404 page Operation method.
Method One
The code is as follows
Copy Code
@header ("http/1.1 404 Not Found");@header ("status:
When you browse the webpage today, an error page appears after you click the webpage link.
This is a bit of an impression. It often occurs when you browse the Web page, but the page displayed is different. For example:
Next let's take a look at it.
1. What is 404?
404 is a standard response of HTTP, so how does HTTP work: see
When a user browses a webpage, th
404 error page, refers to the page in the access time, the browser shows the requested URL does not exist, this page may be the site itself is not, it may be deleted, is called the 404 error page.
The purpose of the 404 error pag
It is frustrating to see the 404 error when browsing the Web page. I am sure that if there is nothing to attract your attention in the next one or two seconds, you will leave the website and never return again. Therefore, many websites design a novel error page to attract users to continue browsing other content. We have collected 50 very creative
The way to set the 404 error page for Apache server is simple: Just add the following in the. htaccess file.
The code is as follows
Copy Code
ErrorDocument 404/notfound.php
Attention:1. Remember not to turn the 404 error to the homepage
The 404 page tells the search engine that the page does not exist and also prompts you to select other operations, next, I will introduce the operation methods for customizing the 404 page in php to my friends who do not have the apache operation permission.
Method 1
The Code is as follows:
Copy code
@ Header ("http/1.1 404 not found ");@
A novel error page can retain users to guide users through other content. 404 page also has some special uses, for example displays the public service advertisement, the promotion website own content and so on, 404 pages is also improves the website user experience one aspect. Here are 30 unique 404
When a page on your site does not exist, a 404 error page can display the information that prompts the user. 404 the error page can be friendly to prompt the user currently requested (page, picture, video, etc.) temporarily not available. Usually a 404
For 404 and 500 errors, we want to define a more user-friendly page.ExampleWhen visiting the following address:Http://localhost/aaaa/bbb/ccc/ddd/eee/fff/gggThe URL of the browser does not change, still isHttp://localhost/aaaa/bbb/ccc/ddd/eee/fff/gggBut the page shows our custom error page.First, add the following nodes in Web. config.system.webserver> httperrorsErrormode= "Custom"> Jump
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.