Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Apr 2006
    Thanked 0 Times in 0 Posts

    Question weird 404 error problem...


    Iím having the weirdest problem Iíve ever seen on any of my websites.

    I made a custom 404.shtml page, which I think was working great for
    some time, and, all of the sudden, it's not rendering correctly. Instead
    it just causes EVERY browser to crash and/or become unresponsive.

    The details make this much more interesting though:

    - The custom error page is working perfectly well on the root.

    So, if I try to open an unexistant file located on the root like
    www.site_url.com/made_up_filename.htm the custom 404
    error file shows up as it should, no problem at all.

    - It fails on every dir or subdir, real or imaginary, when pointing to
    an unexistant page, like www.site_url.com/no_dir/made_up.htm

    - The same problem happens with all browsers, even online browser
    rendering sites (they do process the error message and I was able
    to replicate the problem there - on the root the custom page works).

    - When I open the source code, with the browser, before it goes down
    in flames, it reveals the code is clean! No scritps on the page, no iframes,
    nothing wrong at all. My code is untouched.

    - The 404 error message is also perfect when opened directly, like:


    Checking the 404 error message bit on cpanel (linux server - shared)
    I see itís clean too. I even thought that should be empty, since I made
    the file by hand and uploaded it to the root.

    My custom 404.shtml is a frameset so, considering I need it for all 404
    errors, no matter in what dir, I made sure to use full links, instead of
    relative, so it can trace the frames. That should not be needed since
    wherever the error occurs, the 404.shtml file the server launchs is always
    on the root, right?

    I'm really at a loss here. Not sure if this is unheard of, probably not,
    or easy to fix (I'm hoping it is).

    So why the hell does this happen only on subdirs? What is the problem?
    Did I screw up somewhere? How can I fix it? Itís driving me mad...

    Here's a couple of screencaps (hosted on another site) illustrating
    the problem.

    This one, a response to a 404 triggered on the root, shows everything
    is ok. The still incomplete custom 404 page works great.


    This one shows what happens when I try the same thing on a dir
    instead of the root:


    I can sort of see itís trying to render the same frameset, always
    morphing, as in the process of trying to figure it out, but it just never
    shows up anything usable and always brings the browser down to its

    Does anyone know whatís going on here?



  2. #2
    New Coder
    Join Date
    Apr 2006
    Thanked 0 Times in 0 Posts
    Well, no one helped but I may as well explain how the mess was sorted out, for the benefit of others.

    The issue was with the frames. Initially I was using full URLs on the frameset file (404.shtml), to point to all the indidvidual frame pages. But then, since both the frameset and the individual frames were all on the root, I decided to use relative URLs instead, meaning, jut the filename without the full path.

    That's what was causing the problem, hence the 'worked for a while, it's screwed up now' thing.

    I just assumed the server would er... serve the 404.shtml page from the root and, since the individual frames were there too, it would work. Turns out it didn't.

    So everything went back to normal once I put the full paths back on the frameset page.

    It was one of those simple things that can drive a guy nuts. Well, at least I now have a clean pc, and a couple of days less in my life.


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts