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 C
Let's introduce a module about thinkphp Access does not exist jump to page 404 you need a friend to refer to.
Create a new file in the action EmptyAction.class.php, the code in the file is as follows:
The code is as follows
Copy Code
Class Emptyaction extends action{function _empty () {Header ("http/1.0 404 Not Found");//make HT
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
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
thinkphp frame 404 Page Setup, thinkphp404
The 404 page is the optimization of an error behavior when the system cannot find the requested action method and cannot find the requested controller name .
The first step: Build a EmptyController.class.php in the Home/comtroller in the thinkphp framework with the following
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 av
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
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
404 pages are not frequently encountered when we browse webpages, so they are easily ignored. However, some unintentional 404 pages are indeed very interesting. The 404 page also has some special purposes, such as displaying public welfare advertisements and promoting the content of the website itself. The custom
First take a look at the PHP instance code: @ header ( quot; http11404notfound quot;); @ header ( quot; status: 404 notfound quot;); echo amp; 39; echo404 amp; 39; exit (); check whether 404 is set successfully
Let's take a look at the PHP instance code:
@ Header ("http/1.1 404 not found ");
@ Header ("status:
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 of the website, otherwise it may cause the h
Asp. Net implements 404 page and 301 redirection, 404301
This article describes how Asp. Net implements 404 page and 301 redirection. Share it with you for your reference. The specific implementation method is as follows:
To some extent, 301 redirection has nothing to do with 404
404 page is the page that the client returns when browsing the Web page, because the server is unable to provide information properly, or the server is unable to respond and does not know the reason. 404 bearer of the user experience and SEO optimization of the task.
Hello everyone, I encountered some problems when using toroPHP routing. Currently, the 404 page mounted to toroPHP is: {code ...} problem: 1. I want to customize the 404 page to be consistent with the template on my site. That is to say, how can I use this function to specify the template on my
thinkphp 404 Page Setup method
This article mainly describes the thinkphp 404 Page Setup method, the need for friends can refer to the following
In many web sites will have 404 pages, how to set in the thinkphp framework, then I introduce one of the methods
1, the first
In the thinkphp framework, the 404 page is set to only three steps, namely, thinkphp404. In the thinkphp framework, the 404 page is set to only three steps. the thinkphp403854 page is an error message optimized when the system cannot find the requested operation method and t
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 t
404 page is
The system cannot find the requested action method and cannot find the requested controller nameThe optimization of an error behavior.
The first step: Build a EmptyController.class.php in the Home/comtroller in the thinkphp framework with the following code:
namespace Home\controller;Use Think\controller;Class Emptycontroller extends controller{ Empty Operation _empty () method fu
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
The 404 page is the optimization of an error behavior when the system cannot find the requested action method and cannot find the requested controller name .The first step: Build a EmptyController.class.php in the Home/comtroller in the thinkphp framework with the following code:namespace Home\controller;Use Think\controller;Class Emptycontroller extends controller{Empty Operation _empty () methodfunction _
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.