Apache2 Redirect für nicht existierende Seiten


Wer über Jahre hinweg Websites betreut wird früher oder später auch dazu kommen, daß externe Links auf Seiten verweisen, die nicht mehr existieren.

Je nach dem wie man den Eintrag für 404 Seiten in der apache.conf hinterlegt gibt Apache2 dann sogar (anfangs verwirrende) verschiedene Statuscodes zurück:

ErrorDocument 404 /relativer/link/zur/404-erklaerung.html ergibt einen 404 (not found)

ErrorDocument 404 http://mein.host/404-erklaerung.html liefert einen 302 (document moved)

Was nun für die eigene Site sinnvoller ist, muss man von Fall zu Fall entscheiden.

Vote for articles fresher than 30 days!
Current karma: none, 0 vote(s) 3631 hits
Defined tags for this entry: , , ,

Comments

Display comments as (Linear | Threaded)

    No comments


Add Comment


Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

You can use [geshi lang=lang_name [,ln={y|n}]][/lang] tags to embed source code snippets
BBCode format allowed