Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-25-2009, 10:52 PM   PM User | #1
whopub
New Coder

 
Join Date: Apr 2006
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
whopub is an unknown quantity at this point
Question weird 404 error problem...

Hi,

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:

www.site_url.com/404.shtml

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.

http://www.esthesia.org/regular404layout.jpg

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

http://www.esthesia.org/bad404problem.jpg

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
knees.

Does anyone know what’s going on here?


Thanks,

Whopub
whopub is offline   Reply With Quote
Old 10-06-2009, 07:07 PM   PM User | #2
whopub
New Coder

 
Join Date: Apr 2006
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
whopub is an unknown quantity at this point
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.
whopub is offline   Reply With Quote
Reply

Bookmarks

Tags
404, custom, error, render, weird

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:23 PM.


Advertisement
Log in to turn off these ads.