Apache 404 Error - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Skype & Technology (/forumdisplay.php?fid=9) +---- Forum: Tech Talk (/forumdisplay.php?fid=17) +----- Thread: Apache 404 Error (/showthread.php?tid=31213) Apache 404 Error by Ezra on 09-10-2004 at 09:59 AM
I want a customised 404 error page for my server, the page works, but my server does not show the page when a wrong url is typed. RE: Apache 404 Error by RaceProUK on 09-10-2004 at 10:26 AM
In .htaccess, enter the following line: RE: Apache 404 Error by Ezra on 09-10-2004 at 10:28 AM Already did that, it's not working RE: Apache 404 Error by RaceProUK on 09-10-2004 at 10:30 AM I don't actually know Apache very well, but you have to have .htaccess in the root of your website. Whether you have to have it elsewhere I don't know. RE: Apache 404 Error by WDZ on 09-10-2004 at 04:33 PM
You don't need a .htaccess file anywhere, especially if it's your own server, because all that stuff could just be configured through httpd.conf. quote:Maybe you could post the code you used? And where is the error document located? RE: Apache 404 Error by Mippo on 09-10-2004 at 05:17 PM I think usually .htaccess files are overridden unless it's changed in httpd.conf (or is it just me? ) But if its your own server, using the httpd.conf for ErrorDocuments and stuff is handy RE: Apache 404 Error by KeyStorm on 09-10-2004 at 05:43 PM iirc, you can set your desired 404 target URL in the httpd.conf file. RE: Apache 404 Error by Ezra on 09-10-2004 at 06:59 PM
I tried but I don't really know how all of it works. RE: Apache 404 Error by WDZ on 09-10-2004 at 07:24 PM And where is missing.html? I think it should be in the root directory of your web site. Also, make sure it's larger than 512 bytes, because IE doesn't like small error pages. RE: Apache 404 Error by KeyStorm on 09-10-2004 at 07:46 PM
You should probably give the config an absolute path to your 404 page (since we don't know to what /missing.html is relative). For example: RE: Apache 404 Error by WDZ on 09-10-2004 at 08:08 PM
quote:That doesn't work... I just tried it on my server and Apache tried sending that exact path to the browser, which is obviously the wrong behavior. Anyway, some more info... I tried his site and missing.html definitely exists in the root of his web space, but when you try to view a non-existent page, you get the default error along with "Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request." Edit: Ezra, do you still have the ErrorDocument line in a .htaccess file? If so, delete it, because it will override the httpd.conf. RE: Apache 404 Error by Ezra on 09-10-2004 at 08:34 PM
No, I deleted the .htacces. |