logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Error-page is not shown properly
Author
mapfor



Joined: 06 Nov 2006
Posts: 3

PostPosted: Mon 06 Nov '06 18:10    Post subject: Error-page is not shown properly Reply with quote

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

PostPosted: Mon 06 Nov '06 22:27    Post subject: Reply with quote

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 Wink
Back to top
mapfor



Joined: 06 Nov 2006
Posts: 3

PostPosted: Tue 07 Nov '06 19:02    Post subject: Reply with quote

>> 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

PostPosted: Tue 07 Nov '06 22:34    Post subject: Reply with quote

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

PostPosted: Thu 09 Nov '06 15:34    Post subject: Reply with quote

Unfortunately always the same effect!
Thank you nevertheless.
Back to top


Reply to topic   Topic: Error-page is not shown properly View previous topic :: View next topic
Post new topic   Forum Index -> Apache