404 page doesn't always load correctly


#1

I’ve got a 404 page for a site and also a subdomain of the site. The 404 page (missing.html) is uploaded in each directory to the root level. When I test it live…the 404 page loads fine if, for instance you type: http://www.mysite.com/badpage.html

But if you go one level deeper, like:
http://www.mysite.com/badpage/bagpage.html

…it loads the 404 page but not the images or the style sheet associated with it. Why? I haven’t built this page any differently then I have for the rest of the site, which has multiple levels in the directory. What do I need to fix?

Thanks!

Jamie


#2

On a 404 page, styles, images, .js files etc. are included relative to the actual address of the non-existant file – therefore you need to code error pages so it doesn’t matter where they are called from, either including the full url or an address relative to the root of the site which will start with a / like this:


#3

Crys-
Thanks. I figured it might be something like that…but I just wanted to make sure. I’ll try that.