| m.palmieri 2006-02-14, 4:28 am |
| Hi all, I've got some amazing problem with my httpd.conf (Linux RHEL3 and apache 2.0.17)
What I would be able to do is to redirect users to a special page in case the requested page doesn't exist.
In order to do this I prefer to modify httpd.conf instead of using a .htaccess file due to its lack of performance.
I've created a simple .htm page bigger than 512 Bytes. I can put it everywhere on my disk but something always goes wrong.
The bad code look like this:
<Directory "/home.......">
ErrorDocument 404 /noScheda.htm
</Directory>
I know document root, and I can access via browser to the page noScheda.htm
http://....... .it/noScheda.htm works.
When I close and restart Apache and make a request the browser answers 404 but not with my page.
Why, if I use a valid URL instead, does the server answer correctly?
<Directory "/home.....">
ErrorDocument 404 http://www. ......... /noScheda.htm
</Directory>
This works.
Why I've got these problems with local URI? I know I must use a path relative to the "browser path", in other words specify a path coming after the .it (or .com)...
I'm confused.
I've also tried to use alias and/or string
ErrorDocument 404 "Sorry"
No way.
Can anyone help me?
There's no include or other ErrorDocument uncommented in http.conf.
Thanks
Max |