Welcome to WebmasterWorld Guest from 23.22.46.195

Forum Moderators: Ocean10000 & incrediBILL & phranque

.htaccess

   
12:10 am on Jun 7, 2003 (gmt 0)

10+ Year Member



I've got the following problem:
This is the .htacces file I'm using for my website:

AddType application/x-httpd-php .html
ErrorDocument 403 /yourlogin/error403.html
ErrorDocument 403 /error403.html
ErrorDocument 404 /yourlogin/error404.html
ErrorDocument 404 /error404.html
ErrorDocument 500 /yourlogin/error500.html
ErrorDocument 500 /error500.html

Everything works fine till an error document is requested by the server. It is not shown. But if I delete the first line ("AddType application/x-httpd-php .html") everything works fine (except the parsing).
Is there anybody who can find the problem?

12:31 am on Jun 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try this line instead:

AddType application/x-httpd-php .php .html

9:40 am on Jun 7, 2003 (gmt 0)

10+ Year Member



Thanks. But it doesn't work. I also tried to do it directly in the httpd.conf. Either doesn't work.
You can find the following line in the error.log:

[Sat Jun 07 11:38:33 2003] [error] [client 127.0.0.1] Premature end of script headers: c:/programme/server/php/php.exe

9:49 pm on Jun 7, 2003 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



texttexturen,

WHy do you have multiple ErrorDocuments declared for each error type? You can declare different ErrorDocuments within different .htaccess files, but only one per type per .htaccess file will be used, and I'm not sure whether Apache will use the first or second one - I suspect the second...

If you have the option, increase you error logging level to see if you can dig any more help out of the error log.

Jim

10:24 am on Jun 8, 2003 (gmt 0)

10+ Year Member



Well, I tried to eliminate every line, except:
ErrorDocument 404 /error404.html
Nevertheless, it doesn't work. The funny thing is, that the error 403 is fine. If I try to access forbidden folders with the browser - the correct document is shown. Another strange thing:
When I try to reach the following, non existing document:
[localhost...]
the serverpage which says that error 500 occured appears. But not the one I defined in the .htaccess. Well, there should be a simple error 404. If I ad just one letter to the address like this:
[localhost...]
everything is okay - the error404.html appears.

I tried to set the error level to debug. Unfortunately, I do not understand enough of the messages that appear. The only critical seems to be the one I posted before.

I give up!

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month