htaccess or IIS, redirects can also be handled with
server-side code. For instance, placing this snippet of PHP code at the beginning of a web
page will properly redirect incoming requests:
header('HTTP/1.1 301 Moved Permanently');
header('Location: http://www.yoursite.com/new/page.html');
?>
Similarly, you can use this snippet of ASP.NET code for a page running on Microsoft
servers:
Even the oldest content should redirect to something to avoid linkrot and prevent users
from getting lost in the site. When pages disappear completely and there??™s no indication of
a new location, frustration sets in and visitors will quickly find somewhere else to go.
CONTINGENCY PLANNING
247
11
404 Not Found
Missing content is an all-too-common problem on the Web. The reasons are many.
Websites can get moved to new servers and not all of the pages arrive safely; databases
can get corrupted and dynamic content is simply vaporized into digital ether; someone
types the wrong URL and unknowingly attempts to access a nonexistent page; a website is
redesigned and content gets shuffled into new directories, rendering all incoming links
obsolete.
Pages:
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481