Author |
|
mapfor
Joined: 06 Nov 2006 Posts: 3
|
Posted: Mon 06 Nov '06 18:10 Post subject: Error-page is not shown properly |
|
|
I have installed the Apache server on my local PC.
Wenn I produce for example an error 404, my error page is shown correctly (with the simple Text 'Error').
If I produce an error 500 the source-code (below) of the (same) error-page is shown!
my .htaccess:
ErrorDocument 404 /fehlert.shtml
ErrorDocument 500 /fehlert.shtml
My error-page fehlert.shtml:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Fehler</title>
</head>
<body>
<h1>Error</h1>
</body>
</html>
The error 404 I produce by giving an incorrect address:
http://www.my....domain.de/something.shtml.
The error 500 ba calling my contact-form
http://www.my....domain.de//cgi-bin/kontakt.pl, in which I removed the
definitions of the variables.
Does anybody have a good idea?
Thank you and excuse my "german" English |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Mon 06 Nov '06 22:27 Post subject: |
|
|
Apache works recursive. Means
if
in /folder1 is the htaccess file
the rules will also be in all subfolders like /folder1/folder2
If you want to turn of that. You have to restore the native handler which is the var files, if not turned of multilanguage support
Und zur Not verstehen wir auch denglisch |
|
Back to top |
|
mapfor
Joined: 06 Nov 2006 Posts: 3
|
Posted: Tue 07 Nov '06 19:02 Post subject: |
|
|
>> if
>> in /folder1 is the htaccess file
>> the rules will also be in all subfolders like /folder1/folder2
>>If you want to turn of that
I don't want to turn that off. As the .htaccess-file is in the root it should be valid in the cgi-bin (under the root).
And when that error occurs in a file in cgi-bin the correct error-file is called but unfortunately shown as text-file.
>> You have to restore the native handler which is the var files, if not turned >> of multilanguage support
I don't understand this. But I have actually the multilanguage support turned on (because I have to homepages in different languages). Perhaps not turned on correctly? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Tue 07 Nov '06 22:34 Post subject: |
|
|
Now I hope I got my head around that! cgi-bin is a virtual folder (scriptalias or alias)
So if you want to working your errorpages run on all location, you have to set them global in the httpd.conf (just put that lines at the end of your httpd.conf and not in the .htaccess file) |
|
Back to top |
|
mapfor
Joined: 06 Nov 2006 Posts: 3
|
Posted: Thu 09 Nov '06 15:34 Post subject: |
|
|
Unfortunately always the same effect!
Thank you nevertheless. |
|
Back to top |
|