For Apache servers, setting up 404 and other status response code pages is simple. Like
redirects, it uses the .htaccess file to invisibly route visitors to the appropriate location.
Once your 404 page is on the server, simply instruct Apache on the location by adding a
short line of code to the .htaccess file:
ErrorDocument 404 /path/to/your-404-page.html
That??™s all there is to it. In fact, this same line of code is also used for other error documents,
such as 403 and 500. A typical .htaccess file might contain the following:
ErrorDocument 403 /path/to/your-403-page.html
ErrorDocument 404 /path/to/your-404-page.html
ErrorDocument 500 /path/to/your-500-page.html
CONTINGENCY PLANNING
249
11
This functionality in Apache can handle any type of error document. For Windows servers
running ASP.NET, the process is a bit different. Open the web.config file and search for
the following cluster of code:
redirect="/path/to/your-404-page.asp" />
From here, you can define the path to the custom error page by editing the central line.
Pages:
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485