DelphiFAQ Home Search:
General :: Linux :: Apache
Know-how about Apache, the most popular web server. Both Linux and Windows related information,


This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

Getting more out of 404 traffic (Document not found error)

When your web site visitor clicks on a dead link, most sites just provide a standard screen 'Document not found'.

If the link was on your own site, then you should fix it.

But since there are also dead links on external sites, you should look into having a better error document.

If you have access to your web server's configuration file (typical location for Apache 2.0: /etc/httpd/conf/, then you can define your custom 404 document there. You could have it point to a perl script. The perl script could look at the requested document with $url = $ENV{REQUEST_URI} and try to make intelligent suggestions what document to view instead.

If you cannot use a server side script (perl, php, asp, jsp) as your 404 handler, then you might do some client side processing by adding javascript code.

This is inferior because it relies on the user's setting (Javascript could be disabled!) but better than nothing.

You can look at the document.location property in Javascript and offer a few intelligent suggestions or just state that a certain product/ topic has been removed from your site.

See the tip in the See-also section how to do this in Javascript.

Generated 20:00:38 on Oct 23, 2020