404 is actually the error we can’t find, but that’s the default effect. It’s ugly.

sometimes we need such a function: we want to record is 404 pages which, sometimes I need to judge the 404 page is a static page generation system should not have been successful but does not generate, if it is, we should create the static pages, then the static page generation returned to the user.

the logic I have to deal with is to jump 404 errors to a page, and we call it "missing404.php

"

and then implement the functionality we need on this page.

first defines the jump: use the following statement in the definition of the virtual site.

ErrorDocument 404 http://s.www.5156xyx.com/missing404.php

After the

definition is complete, the virtual site is as follows

           ; < VirtualHost *: 80>

        ServerAdmin ;       [email protected]

        /usr/local/apache/htdocs/5156xyx.com

;   DocumentRoot;

        www.5156xyx.com

;   ServerName;

          ServerAlias ;       5156xyx.com

        logs/5156xyx.com_err_log

;   ErrorLog;

       ;   CustomLog; logs/5156xyx.com-access_log2; common

       ;   ErrorDocument 404 http:>