Forum Moderators: phranque
<VirtualHost *>
ServerName www.myexample.com
DirectoryIndex index.jsp
DocumentRoot "/myroot/myfolder"
ErrorDocument 404 /myroot1/myfolder1
Redirect permanent / http://www.example.com/index.jsp
</VirtualHost>
The errordocument never gets served. All I get is the standard Internet Explorer 404 page. Even if I set the 404 errordocument in the main body of httpd.conf, still it doesnt serve it. I ran a trace over my server headers for a non-existant page, it's definitely returning a 404, but it just will not pickup the code. Does anyone have any idea why that would happen? The path to the ErrorDocument is there. I can verify that.
[edited by: jdMorgan at 5:42 pm (utc) on Jan. 16, 2008]
[edit reason] example.com [/edit]
You might want to try testing with a different browser. IE requires that the error document exceed a certain size -- 512 or 1024 bytes, typically -- before it will display the error document. This is controlled by the "Show friendly HTTP error pages" setting in IE. But since you cannot change your visitors' browser settings, you'll need to make your document long enough for IE to display it.
Testing with a different browser that does not interfere with error document display will tell you whether the problem is server-side, or just IE interfering.
Jim
Let's check this, too:
ErrorDocument 404 /myroot1/myfolder1
should be
ErrorDocument 404 /myfolder1/[i]custom-error-page.html[/i]
That is, it is a apecific-server Web-root-relative path.
Jim
[edited by: jdMorgan at 6:02 pm (utc) on Jan. 16, 2008]