Forum Moderators: phranque

Message Too Old, No Replies

500 error instead of 404?

very strange

         

CWebguy

9:14 pm on Mar 7, 2009 (gmt 0)

10+ Year Member



I have only a few files in the main directory of a site that I have been working on. I am now getting 500 internal errors instead of 404's on anything that should be returning a 404. I have no .htaccess file or even a robot file. It's baffled me. Any ideas?

Thanks.

g1smd

11:50 pm on Mar 7, 2009 (gmt 0)

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



Check with your host for something misconfigured.

CWebguy

12:06 am on Mar 8, 2009 (gmt 0)

10+ Year Member



ok, will do, thanks

phranque

12:07 am on Mar 8, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



check your server error log

CWebguy

1:14 am on Mar 8, 2009 (gmt 0)

10+ Year Member



I think it's 'Request exceeded the limit of 10 internal redirects due to probable configuration error. '

phranque

7:58 am on Mar 8, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you must be doing some recursive internal rewrites in your config file if you don't have a .htaccess file.

CWebguy

4:00 pm on Mar 8, 2009 (gmt 0)

10+ Year Member



Thanks, being a guy I have a tendency to try to fix things rather than just contact the host or something ;) (then I get to learn too.) I'll look for a config file somewhere, thanks.

Lance

CWebguy

6:03 am on Mar 9, 2009 (gmt 0)

10+ Year Member



Problem was in .htaccess file being hidden in a directory. Thanks.

phranque

6:14 am on Mar 9, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



on *nix systems any file named with a '.' prefix is intended to be a hidden file.

added:

hidden in a directory

(ok maybe you knew that .htaccess is hidden but you meant it was unexpectedly in a "non-root" directory.)

on a side note, i just learned recently you can't rename a file to .htaccess on XP!

CWebguy

6:57 am on Mar 9, 2009 (gmt 0)

10+ Year Member



Really, I've done it on XP

phranque

11:59 am on Mar 9, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



using the rename option in the explorer context menu?

(sorry for going OT, but hey it's your thread!)
=8)

g1smd

8:31 pm on Mar 9, 2009 (gmt 0)

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



You can't rename it in Microsoft programs like Explorer, but you can rename it in most third-party applications.

CWebguy

8:32 pm on Mar 9, 2009 (gmt 0)

10+ Year Member



No, using something like notepad.

Choose "all files" for the type and .htaccess for file name. Should work. It's worked for me. That's how I always do it. You helped me so I help you ;)

Take care,
Lance

[edited by: CWebguy at 8:34 pm (utc) on Mar. 9, 2009]

jdMorgan

1:59 pm on Mar 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One possible cause for getting a 500 error instead of a 404 is that a custom 404 error page has been defined using ErrorDocument (either in .htaccess or by using the "control panel"), but that custom 404 error page does not exist.

The result would be a cascade of 404 errors, as the server would attempt to server the custom 404 error page in response to an initial non-existent-file request, but encounter another 404 when the custom error page was found not to exist. This would result in another 404, and another, etc., until the server gives up.

This situation would be noted obviously in the server error log file.

Jim

g1smd

2:23 pm on Mar 10, 2009 (gmt 0)

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



You'd have thunk there would be a catch for that, so it could give a sane public error message instead.

bertrand

7:30 pm on Mar 10, 2009 (gmt 0)

10+ Year Member



I had 500 error messages before because of Mac formatted line break. Beware! ;)

g1smd

7:38 pm on Mar 10, 2009 (gmt 0)

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



You know what they say...

"Error 500? Only 499 to go."

[Source: jdMorgan, 2007]