Categories
General

404 & Apache Voodoo Magic…

I just sent off instructions to Shannon, but figured I would post them here too. This is how I (finally) set up my custom 404 error page. I didn’t have to use Telnet (the original way Jay was going have me set it up required that, but then he hooked me up so I could just FTP when he realized I had forgotten all I once knew about Telnet). These instructions require a Unix server running Apache. If that is what your site is hosted on … oh, this is sooooo easy it’s wonderful! I feel like a nut for never doing it before! First, you create your custom 404 page. Name it whatever you want. Be sure to set the path right in the line of code below. For my demo it is named “404.html”.

Upload it to the same directory that has your index.html page, the “root” of your site. (My sites are in subdirectories – so http://www.pixelwannabe.com/blahblahblog will take you to blahblahblog.com so my 404 for blahblahblog would go in the same spot where my index.html for blahblahblog is at. Make sense?)

Create a text file in notepad. You will have a line of code in it:

ErrorDocument 404 /404.html

That’s it. The only line. Unless you want to make other pages – there is a 403, a 500, other random ones, but 404 is of course the one we see most often. Or if you had to use the .htaccess file for something else, then you might have more info in there. Save the text file as “.htaccess” without the quotes. Yes, the file name looks odd. Yes, .htaccess – trust me on this. FTP it in ASCII mode to the same location you sent the HTML file to, where your index.html file is located. VIOLA! That’s it. You have a 404 error page, all your own!

Let me know if you have any questions! (No promises that I will be able to answer them, but I’ll try!) Or if my directions are wrong, please let me know. If you want to learn all about .htaccess files and other bits of things like that, you can visit Apache.org.

By Christine

Christine is an Avenger of Sexiness. Her Superpower is helping Hot Mamas grow their Confidence by rediscovering their Beauty. She lives in the Heights in Houston, Texas, works as a boudoir photographer, and writes about running a Business of Awesome. In her spare time, she loves to knit, especially when she travels. She & her husband Mike have a food blog at Spoon & Knife.

8 replies on “404 & Apache Voodoo Magic…”

I will trythat, I just installed Apache (he hee it worked, Im so excited) and then PHP (wheee).

Just had to share!

To digress, TAR is on tonight! Yeah! So, it is an elimination round? Hmmm, doesn’t look like it. Oh well should be fun!

I will trythat, I just installed Apache (he hee it worked, Im so excited) and then PHP (wheee).

Just had to share!

To digress, TAR is on tonight! Yeah! So, it is an elimination round? Hmmm, doesn’t look like it. Oh well should be fun!

of course, if your host provides you with cpanel *poke christine* all you have to do is log into your control panel and there’s a little button you can click that will create not just a custome 404 error page, but about 5 others as well. Then they’ll show up in the root directory of your site and you can edit them as normal. i suppose that is not as 1337 sounding as editing your .htaccess file though. 😛

Comments are closed.