1. Custom 404 error page for Linux virtual host settingsSetting a custom error page allows you to add website records and retain customers who may not be able to open the page. Windows provides custom error page settings for our VM, you can set all custom errors, including the 404
Source: www.php100.com
Custom jump instructions for Apache 404 error pages
The 404 error is actually a file error that we often see, but it is the default effect and is ugly.
Sometimes we need such a feature: we need to record what is the
During PHP website development, an HTTP 404,403 error occurs when a user fails to access a website or fails to find a page. To improve user experience, we need to customize the 404 and 403 error pages, prompt the user to perform the next step or automatically jump to the appropriate access page.The custom error page
With this cpanel error page tool, you can customize the error page. There are two simple ways to set a custom 404 error page.One, use the Cpanel background Control Panel to add a method to set up 404 custom error pagesSteps1, Logi
the previous similar header or add a same type of header. It is replaced by default, but if it is set to FALSE, multiple similar headers can be forcibly sent. For example:Header ('www-Authenticate: negotiate ');Header ('www-Authenticate: ntlm', false );?>The second optional parameter http_response_code sets the HTTP response code to a specified value (this parameter is newly added by PHP 4.3.0 ).There are two special header calls. First, the header starts with the string "HTTP/" (Case Insensiti
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
expired or has not been in effect HTTP 404.1-Unable to find Web siteHTTP 404-File not FoundHTTP 405-Resource is forbiddenHTTP 406-UnacceptableHTTP 407-Proxy Authentication RequiredHTTP 410-Never availableHTTP 412-Prerequisite failureHTTP 414-Request-URI too longHTTP 500-Internal server errorHTTP 500.100-Internal Server error-ASP errorHTTP 500-11 Server shutdownHTTP 500-12 Application RestartHTTP 500-13-Ser
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
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
Configuration method:
Tomcat 5.5/server.xml file, adding between
Workaround:
The following is the Tomcat 5.5/conf/web.xml file content: (You look for it, as if it were this directory)the default value of (http://localhost:8080/test/ ) is displayed as a list (all files and folders are listed as Tomcat5.0 by default). There will be no 404 errors.If you do no
IIS: Set the 404 error page under IIS8.5. IIS version: IIS8.5 problem description build a test website, a total of 2 pages (index. php and 404.php). the default homepage is index. php when accessing index. php and 404. when using php, IIS service IIS version: IIS 8.5 problem description
Build a test website with two pa
If your users can not 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 notifications to the network management of good things. ---teaman translation and Finishing
# set $domain for your domain (note no www)
$domain = "oso.com.cn";
If your users can not 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 notifications to the network management of good things. ---teaman translation and Finishing
# set $domain for your domain (note no www)
$domain = "oso.com.cn";
#
Today suddenly found a problem, the site set up a custom 404 page, showing is no problem, just return the status code is 200, rather than 404!!
To see my nginx configuration:
Nginx.conf
The code is as follows
server {
...
Error_page 404 =/404.php;
...
}
At first glance there is nothing, the Internet search for
Do the site operation of friends know, due to site upgrades, system changes, virtual host replacement and so on can cause some pages can not be accessed, many friends do not seem to attach great importance to this aspect, always feel unable to visit even Bai. But this for the website SEO internal optimization is a big bogey, in particular, search engine and included pages, if there is no access to the situation, over time, the spider will think you this site is unstable, and unstable, and can no
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
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.