Rewrite and 404 error pages each have an advantage. Some of their differences:
The advantage of the 404 error page may be that the rewrite module needs to be called without calling the module. Rewrite As a result, the 404 error
If you have just started to learn PHP, there may be many functions need to study, today we will learn how to use the PHP Header (), more instructions, please refer to the PHP Chinese manual, the following is a detailed use of the header function instructions
Header Implementation 404 Unable to find page
Copy CodeThe code is as follows:
Header ("http/1.1 404 Not Found");
For the ErrorDocument
If you have just started to learn PHP, there may be many functions need to study, today we will learn how to use the PHP Header (), more instructions, please refer to the PHP Chinese manual, the following is a detailed use of the header function instructions
Header Implementation 404 Unable to find page
Copy CodeThe code is as follows:
Header ("http/1.1 404 Not Found");
For the ErrorDocument
IIS default error page is very unfriendly, many people see the default error page will say: The site can not open! Loss of this part of the flow. And if the error page directly to the home page and search engine is very unfriendly, not good home will also be sealed off. So according to the situation, there are two ways to solve this problem:
1, if it is a blog an
If the user who visits your site has temporary page access failures due to various reasons, give him a friendly response and you know that this error has occurred. let's look at the following procedure, is used to customize the 404 error page and send notifications to the good east of the network management... page 404
If you are just beginning to learn PHP, there may be many functions to study, today we will learn how to use the PHP Header (), more instructions, please refer to the PHP Chinese manual, the following is about the Header function detailed use instructions
Header Implementation 404 Unable to find page
Copy Code code as follows:
Header ("http/1.1 404 Not Found");
For the ErrorDocumen
Site appears dead link is every webmaster do not want to see one of the questions, the existence of dead links will not only seriously hit the user's friendly experience, but also if the dead chain will attract more search engine punishment. But the dead link is inevitable to each site will encounter, especially some just upgraded the site. Site upgrades in the column adjustment, content deletion and so on will cause the site to appear a large number of dead links. Encountered this sit
If your users can't find the page he wants, how to give him a friendly reply, and you know that this error has occurred, look at the following program, is used to customize the 404 error page and send a notice to the network management of good things. ---teaman translation and Finishing
# set $domain for your domain (note no www)
$domain = "oso.com.cn";
# set UR
If the user who is visiting your site temporarily appears unable to access the page for a variety of reasons, how to give him a friendly reply, and you know that this error occurred, look at the following procedure, is used to customize the 404 error page and notify the network management.
# set $domain for your domain (note no www)$domain = "Oncoding.net";# set
If your users can't find the page he wants, how to give him a friendly reply, and you know that this error has occurred, look at the following program, is used to customize the 404 error page and send a notice to the network management of good things. ---teaman translation and Finishing
# set $domain for your domain (note no www)
$domain = "oso.com.cn";
# set UR
Ajax requests php to report error 404, but the script can properly output data. Ajax requests php to report error 404, but the script can normally output data. Solution 1. the scenario ajax requests the php script to return a 404 status code, but the php script can output da
Each project may encounter 404,403,500 error code, such as no error page, will give the user a very unfriendly interface, the Springboot project also has this problem.However, in the official document does not have the relevant configuration information, which requires us to implement, check the information, and test pass, there is a method is relatively simple and feasible.For Springboot integration MVC he
The method is as follows:Create an HTML file for your 404 pages. It could be anything you want. This may be 404 is just a blank page. It can also be your layout, which includes 404 words of it. It all depends on your will.Save the file in any file format you want (HTML format, PHP etc; and upload it to your Web page. You can always be in your primary or root dire
Set 404 status in ASP
The code is as follows
Copy Code
Response.Status = "404 Not Found"%>
Asp. NET Setup 404 page
Add code to 404.aspx:
The code is as follows
Copy Code
Response.Status = "404 Moved Permane
Header ("http/1.1 404 Not Found");
Copy CodeFor the ErrorDocument 404/404.php function in Apache configuration, the
Error_page 404/404.php;
Copy CodeChange into
Error_page
For every website or blog, the 404 error page is a very common phenomenon. If a viewer clicks a broken link or accidentally enters an incorrect website, they always get a page that says, "404 error! "This boring error page cannot be found" is an unpleasant experience for gen
IIS version: IIS 8.5 problem description
Build a test site, a total of 2 pages (index.php and 404.php), the default home page is: index.php
When accessing index.php and 404.php, the IIS server responds properly, stating that there is no problem configuring the PHP environment in IIS 8.5.
Visit index.php
Access 404.php
In addition, my
Phpheader () implements the 404 error state of the program. This article will show you how to use a program to send php404 information. if you need it, refer to the following. For the ErrorDocument404404.php function in apache configuration, this article shows you how to use the program to send php 404 information. if you need it, refer to the following.
For the
Method One
The code is as follows
Copy Code
@header ("http/1.1 404 Not Found");@header ("status:404 not Found");echo ' echo 404 ';Exit ();
Load a 404 error page
The code is as follows
Copy Code
@header ("htt
: This article mainly introduces how to create a 404 error page and send it to the Administrator. For more information about PHP tutorials, see.
# Set $ domain to your domain name (note that there is no www)
$ Domain = "oso.com.cn ";
# Set the URL. Note that there is no dash/
$ Docroot = "http://www.oso.com.cn ";
# Set the font of the error message
$ Fontface = "
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.