One, Apache + PHP to make custom 404 page method.
The first thing to do is to deal with files that don't really exist, by using Apache's . htaccess definition,
The method is to create a new. Htaccess, at the beginning of. Htaccess Plus: ErrorDocument 404/404.php (/404.php
Just into the SEO line soon, on the back of the site do not put a light lifting, can not be revised as far as possible the idea of revision. Now it seems, that is not necessarily the truth. In the case of such fierce competition, stagnation means lagging behind. The revision may bring some impact, but if you do a good job of detail, the flow of traffic will be controlled. However, we tend to forget the revision of this step, 404
There are two ways to customize the 404 error page for the Apache server:The first method is the simplest, directly under the Apache httpd.conf Configuration Modification Command, the contents of the changes are described in. htaccess command syntax in the custom error pageThe second method can be configured in the. htaccess file, see the custom error page in the
For a site 404 error page is also non-prudential important, 404 pages if done well can increase the user experience, but also to enhance the user's friendliness of the site. Here's a list of some of the most insured 404 pages in ASP. Recommended Learning C # Basics tutorial . The code is as follows:Response.statuscod
The example tutorial uses html5 and css3 to create a creative 404 page, html5css3Can your website 404 page help others remember your website? Next we will introduce a creative 404 page created by html5 and css3. The
Yesterday, small blog appeared down the right signs, domain is not in the first place, in the third, ranking directly from the third page directly to the sixth page. How to see whether the site down the right, this article introduces the site to reduce the right to view the method, there are some worthwhile to learn.
However, I know that my blog is not the problem, and today again looked for information, a
Error | Web page
We can often see this page. Use of the error page default, is that enough? No, the result of this default 404 error page may be that the user is unable to get any hints and then simply abandons the site and your users are lost.
The
In the custom error for IIS, in the "HTTP Error message" box, locate 404, select Double-click, or select "Edit Properties" on the point to define your site's 404 page address.Message type Select "url" to fill in the absolute path of the URLYou want to set response in an ASP page for error mapping. Status = "
CopyCode The Code is as follows: # Set $ domain to your domain name (note that there is no www)
$ Domain = "jb51.net ";
# Set the URL. Note that there is no Dash/
$ Docroot = "http://jb51.net ";
# Set the font of the error message
$ Fontface = "verdana ";
# Set the font size of the 404 page
$ Fontsize = "2 ";
# Set the background color of the 404
Typecho can use the is syntax to determine the page, such as $ this- amp; gt; is ( #039; page #039;); how can I determine the 404 page? Typecho can use the is syntax to determine the page, for example, $ this-> is ('page'); how c
404,50x Such errors are often encountered.If the%catalina_home%\conf\web.xml and the specific application have the settings%catalina_home%\webapps\root\web-inf\web.xmlThe application is in effect.How to set up a friendly user experience, for example in the Windows environment:Add the default file when an exception occurs, the file location is as follows (if you do not set reloadable to True or autodeploy= "true", you will need to restart Tomcat for the changed web. XML to take effect):(1) Add in
Each website should have a 404 error page that shows how users cannot find the page system. By default, 404 Not found is always ugly. Today, we recommend several 404 pages with design ideas.
Each website should have a 404 error
IIS Version: IIS 8.5 Problem Description
Build a test website with two pages (index. php and 404.php). The default homepage is index. php.
When accessing index. php and 404. php, the IIS server can respond normally, indicating that there is no problem in configuring the PHP environment in IIS 8.5.Access index. php
Access 404.php
In addition, my error
There is a problem. The code in the middle of the page finds that there is no ID. how can I get the 404 status code returned? As you know, output 404 depends on the header. Generally, the first header (404... similar.
However, when some logic code is encountered, the client 404
is more than one, but this method is relatively simple.
which
~ \.php ($|/)
Is the URL that contains the. php in the matching request path.
Third, add 404
404 page Add Toss a day, first need to open in nginx.conf
Fastcgi_intercept_errors on;
Remember to turn this on, or you won't be able to customize the 404
There are many methods on the web, but basically the same, this is just one of the methods, the pro-test is effective, the record may be useful later1.First write a 404 page 404.aspx under the project root directoryThen add in the configuration file Note This mode, redirectmode default to responseredirect This mode will produce a 302 jump, very unfriendly to the
After the development of the project to block the error, in the bottom directory to write a 404 page, the entry file App_debug to False, the code uses the following methods1. Using an empty operation, _empty (), when entering a controller, if the method is not found, call _empty directly, and then enter 404.2. In TP, when initializing the project, there is a common~ under runtime Runtime.php, this is a cach
During the optimization process, 404 error processing has a huge impact on Search Engine indexing. ecshop does not do this, And ecshop program file category. PHP and goods. the following code exists in multiple pages such as PHP: ecs_header ("Location :. /\ n "); exit; it means that if you cannot find the category or product under the current ID, you will be redirected to the homepage of the website. In this way, the returned HTTP code will be 302, in
In the previous article to share the "Set 301 Redirect Method" article, mentioned 301, that must also say 404 error page. Because we installed the default LNMP 404 pages will not automatically set, and will not default to the program's 404 error page, but we need to manually
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.