Custom 404 Error Message
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…
April 26th, 2002 at 9:30 pm
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
April 26th, 2002 at 9:35 pm
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.
April 27th, 2002 at 6:42 am
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?
April 27th, 2002 at 8:28 am
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.
April 27th, 2002 at 11:40 am
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!
April 28th, 2002 at 5:10 pm
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.
April 28th, 2002 at 6:05 pm
*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.)
April 28th, 2002 at 9:44 pm
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… (
April 29th, 2002 at 12:08 am
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
April 29th, 2002 at 12:12 am
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!
April 29th, 2002 at 5:20 am
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.
April 29th, 2002 at 6:58 am
I think it depends on whether or not the server your on is configured to show hidden files. Most are, some aren’t.
April 30th, 2002 at 5:02 am
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?
April 30th, 2002 at 10:50 am
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.
April 30th, 2002 at 9:51 pm
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!
April 30th, 2002 at 10:18 pm
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.
May 1st, 2002 at 3:53 am
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!
May 1st, 2002 at 6:41 pm
“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?
May 1st, 2002 at 7:09 pm
Hah! I should actually try these things out before posting inane comments here.
It works! WOOHOOOOOOOO!
March 16th, 2003 at 10:13 pm
Just posted something to my site that was relevant to this, and forgot to trackback
(I think it’s nifty at least!)