scriptygoddess

26 Apr, 2002

Custom 404 Error Message

Posted by: Christine In: How to's

Not necessarily a "scripty" thing, I keep meaning to set up my very own 404 error page, and I (a) don't know how and (b) when I have been given instructions I lose them. So the Custom 404 File Not Found Error Document Message Tutorial that I found at Brandy's site is a helpful thing for me to have around!

Jenn … 404 errors, uh, does that have something to do with .htaccess?!? Hmmmm…

20 Responses to "Custom 404 Error Message"

1 | Jennifer

April 26th, 2002 at 9:30 pm

Avatar

duh… what's that 😉 (ok, sorry for the inside joke… someone I know who REALLY SHOULD KNOW what .htaccess didn't… and I'm still not over it) LOL

2 | Jennifer

April 26th, 2002 at 9:35 pm

Avatar

Also… (actually posted on this site previously – but I'm bringing it up again since it's relevant here too) was a link to snipe scripts where phpLinkRot is an excellent way to fix broken links. Basically it's a custom 404 page with a PHP script on it that can capture the link the user was TRYING to get to but couldn't. There's an email form, they fill it out and send it to you so you know where the borken links are.

3 | marc

April 27th, 2002 at 6:42 am

Avatar

this is SO not related to this post but i'm not sure where to post general stuff :(

love the site and it seems to be getting bigger every day (as it should i guess) i was thinking that a search function might be needed in the near future so that all us scriptidiots can find what we're looking for.

good/bad idea?

4 | Lynda

April 27th, 2002 at 8:28 am

Avatar

Marc, good idea. I think better organization might be in order too. Like sections for php, javascript, specifically, etc. But I'm really horrid at organization and if I try to suggest categories, every post will end up havng its own.

5 | Christine

April 27th, 2002 at 11:40 am

Avatar

I think it's a great idea. I'll get with Jennifer on it so that we can set it up – I have all the MT Search code ready to slide in to place. Search … coming soon!

6 | Kymberlie R. McGuire

April 28th, 2002 at 5:10 pm

Avatar

Question from a clueless person here. :-) My site, like Christine's, uses skins. Is there a way to set the 404 page up so that it changes based on your skin? Just curious.

7 | Amy

April 28th, 2002 at 6:05 pm

Avatar

*shrug* I do it, but then again perhaps I'm doing it in a cheat-y way. My sysadmin configured my server so that it looks for a 404.php file in the root web directory. It uses that as the 404 file. I have it skinned like every other page on my site. Perhaps instructions on how to do this are included in the tutorial? (I'm in the middle of debugging a chunk of code, or I'd break concentration and check for myself.)

8 | Jennifer

April 28th, 2002 at 9:44 pm

Avatar

Kymberlie – I think there's a snippet of code at the top of your page that sets up the skin – I would imagine that you'd create the 404 with that same snippet of code…

Don't know if that makes sense… (

9 | Kymberlie R. McGuire

April 29th, 2002 at 12:08 am

Avatar

I wasn't sure for some weird reason if that would work. No idea what I was thinking. :-) It works, thanks to Christine uploading my .htaccess file that I accidentally overwrote. LOL

10 | Christine

April 29th, 2002 at 12:12 am

Avatar

Teehee! Our lesson learned tonight? Make sure your FTP software is set to display hidden files – like the .htaccess file. Otherwise you might overwrite something you need – like the code that makes your PHP parse on your site. (Her skins were *poof* gone! I knew immediately what had happened too. Fast to fix!) If you have an existing .htaccess file, just add the line to it, don't overwrite it!

11 | Row

April 29th, 2002 at 5:20 am

Avatar

That's interesting, it's the FTP software that displays it or not? Because on my new domain I see my .htaccess file (which gave me a 500, bah!) but on my old domain it would disappear into the ether after I uploaded it.

I always keep a copy offline that I amend, anyway. :)

12 | Lynda

April 29th, 2002 at 6:58 am

Avatar

I think it depends on whether or not the server your on is configured to show hidden files. Most are, some aren't.

13 | Row

April 30th, 2002 at 5:02 am

Avatar

I'm still getting the 500 when I upload the .htaccess file, whether I CHMOD it or not. Does anybody know why this might be happening? Could my host have a document higher in the tree preventing me using it? :(

14 | Lynda

April 30th, 2002 at 10:50 am

Avatar

Row, do you mean it's giving you a 500 error when you try to access it in your FTP program (ie overwrite it with the new one, etc) ???

If so, try changing the CHMOD to 777 and then try deleting it and uploading the new one.

If you mean it's giving your PAGE a 500 error (like you put the .htaccess file there and then every time you go to your index page you get a 500 error) it means something is out of whack inside your .htaccess file and it's trying to direct to something or do something that isn't really there.

15 | Row

April 30th, 2002 at 9:51 pm

Avatar

It gives my page a 500 error. I thought I had everything right, all the .htaccess file was, was

ErrorDocument 404 /rowf/error.php

I thought that was the correct syntax, and that page exists. The error document can be a .php can't it?

BTW thankyou Lynda for answering my questions! 😀

16 | Lynda

April 30th, 2002 at 10:18 pm

Avatar

It can be php, mine is. I just tried everything just how you have it setup and I'm not getting any errors. Perhaps you should ask your host about it. They should know whats going on.

Meanwhile, perhaps try putting the full URL in there?

ErrorDocument 404 http://fullurl.com/rowf/error.php

I doubt that will work, but I guess it's worth a shot.

17 | Row

May 1st, 2002 at 3:53 am

Avatar

It must be a host thing, cause the full path didn't work either :(

I'll ask him.

I'm really disappointed. I went all geeky and even had a skin on the pages, and I can't implement them!

18 | Row

May 1st, 2002 at 6:41 pm

Avatar

"By default I have the .htaccess to only allow overriding authentication information. I have set it for your domain to allow you to override any directives controlling document types (FileInfo)."

I'm too stupid to understand this. Is this basically his permission?

19 | Row

May 1st, 2002 at 7:09 pm

Avatar

Hah! I should actually try these things out before posting inane comments here.

It works! WOOHOOOOOOOO!

20 | Erica

March 16th, 2003 at 10:13 pm

Avatar

Just posted something to my site that was relevant to this, and forgot to trackback 😛 (I think it's nifty at least!)

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements