Forum Moderators: mack

Message Too Old, No Replies

404.shtml training requested

I get "file not found...404.shtml..." on my server log...

         

albo

1:05 am on Sep 1, 2007 (gmt 0)

10+ Year Member



...when a link fails. (Ok, I've fixed the link. Stoopid typo, or failure to recognize that some browsers want "favico.ico" even though I specify my favorite .png...)

I've seen the threads here on 404.shtml. All I need is, a SIMPLE MINDED explanation of, what I need to do, if anything, about creating a 404.shtml...what form it should take...and like that. (I saw one thread around here, said it could cause, "an infinite loop"? I don't want THAT, of course!)

But I don't quite catch all the .htaccess and 301ing and all the business that goes in with it. Would someone do me the kindness of directing me to a "dumbed down" primer? (...My background is mainframes, not PCs.)

Corey Bryant

9:59 pm on Sep 3, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am not too familiar with htaccess, but I would recommend that you use virtual links:
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon" />

or absolute links
<link rel="shortcut icon" href="http://www.example.com/images/favicon.ico" type="image/x-icon" />

and not relative links.

You might check out Error Messages [clockwatchers.com] and Comprehensive guide to .htaccess [javascriptkit.com] to help with the htaccess some

-Corey

[edited by: Corey_Bryant at 9:59 pm (utc) on Sep. 3, 2007]

Marcia

1:44 am on Sep 4, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Create a custom 404 page and in .htaccess

ErrorDocument 404 yourfilenotfoundpage.html

albo

3:55 am on Sep 5, 2007 (gmt 0)

10+ Year Member



Thank you both! *Especially* for the Comprehensive Guide...I've looked into it some more, and see that my host prefers me to use their cpanel to maintain the .htaccess file, but I'll pore over the Comprehensive Guide for the help it'll give me in negotiating the cpanel neighborhood.

Thanks again!

Marcia

4:38 am on Sep 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



albo, just run it through an HTTP header checker and make sure it returns a 404 and nothing else.

meditation

6:46 am on Sep 5, 2007 (gmt 0)

10+ Year Member



Also, in .htaccess instead of redirecting to a html page, you could redirect to a php page, wherein you could put some code for emailing you each time the 404 message has been generated.
This could be useful to trace down other requests to the server that produce the same error.
Regards