...

View Full Version : 403 and 404 Redirection with Apache



paulq
07-13-2006, 04:45 PM
I am trying to redirect users that try to access either forbidden or missing files to a standard error page using Apache v1.3.35. I did some reading and found that using "ErrorDocument 404 /error.php" in httpd.conf does the trick quite nicely until I try to access something like "www.domain.com/folder_does_not_exist/".

In that case my pages look for my CSS sheets, which are stored in /CSS/, in /folder_does_not_exist/CSS/ therefore error.php displays, but without styles.

Same thing happens with images that are in /images/ any idea what I am doing wrong?

paulq
07-13-2006, 08:07 PM
Answer to my question was found here (http://www.404-error-page.com/404-create-a-custom-404-error-page.shtml):


One trick, though, is to remember that error pages can pop up anywhere in your site heirarchy, so make sure all your graphic references, links to other areas on the site, etc, are absolute references, that they start with '/' or, in extreme cases, 'http:'.

ronaldb66
07-14-2006, 07:27 AM
Paulq,

Thanks for the followup! :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum