Forum Moderators: phranque

Message Too Old, No Replies

500 errors that should be 404s

         

rainborick

3:52 pm on May 9, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have a problem on an Apache-based virtual server that I don't understand. A couple of days ago I noticed an unusal number of 500 errors in my logs. My investigations showed they were caused by some JavaScript code that created <img> tags under certain conditions. The 'src' attribute in those tags used relative addressing ('../images') that should point one level lower to the root where my images directory resides. But the server logs showed that the requests that spawned the 500 errors were pointing to '/cgi-bin/images'.

Okay, so I'm baffled. The code involved has remained unchanged for 8 or 9 years, and actually seems to work despite the 500 errors. I started by installing a band-aid server redirect and hard-coding a couple of complete URLs for the images, but I really want to know what's going on here. Why would these problems arise suddenly? Why do they throw 500 errors and not 404s? I would appreciate any advice.

Receptional Andy

2:23 pm on May 10, 2008 (gmt 0)



The 500 errors may be because the images are called from the cgi-bin directory. Perhaps your host has been tweaking security?

rainborick

3:16 pm on May 10, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks. I fixed the 500/404 issue. A silly mistake, of course. I'd forgotten to update my script that logs 404 errors, so it crashed on every instance. But I'm still getting the original 404's and having no luck in tracking down the cause. I'm still plugging away at it, but this thread is no longer appropriate for the Apache forum, so I'll post in either the HTML or JavaScript forums if I can't crack it soon.

Thanks again!