|
|
|
|
![]() ![]() |
Jun 1 2005, 03:44 PM
Post
#1
|
|
|
Newbie ![]() Group: Members Posts: 3 Joined: 1-June 05 Member No.: 7,764 |
I've seen a tutorial on here and no offense but it was horrific, this is the real way you do a 404 Error Page.
Make a file called: htaccess.txt Open it up and put this: CODE ErrorDocument 404 /myerrorpage.html You will need to change myerrorpage.html to whatever your page is called. Also when you upload this file to your server you need to rename it to: .htaccess Yes, the dot is before the words. You need to do this on the server because on Windows you cannot do that! |
|
|
|
Jun 1 2005, 04:34 PM
Post
#2
|
|
|
Moderator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,325 Joined: 8-March 05 From: Mawson, Antarctica Member No.: 4,254 |
I approved this tutorial so that other members who do not have cPanel in their web hosting and who find us on google will know how to make a 404 page.
Now, Shawn, I believe that you are referring to fsastraps' 404 tutorial. His code was merely for "myerrorpage.html" so to speak. I know he did not make a .htaccess file as you did because trap17 already has that. You can also make 404 error pages, as well as other error pages, without doing what you did, so there is no need to flame. By the way, Windows XP can make .htaccess. I know because I've done it several times. |
|
|
|
Jun 1 2005, 07:52 PM
Post
#3
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 372 Joined: 14-October 04 Member No.: 1,736 |
Yeah, I've done that on mine, too. However, I sometimes have dificulties naming it that...I get some error message saying that it doesn't have a file name or something...just save it that way using Notepad, and I believe it will do it (I haven't done it in a while, so I don't quite remember how I did it).
|
|
|
|
Jun 2 2005, 04:30 AM
Post
#4
|
|
|
Newbie ![]() Group: Members Posts: 3 Joined: 2-June 05 Member No.: 7,782 |
Thanks for your help with that matter! I've had a problem with error pages with my previous host and i couldn't figure out what I was doing wrong. Thanks!
|
|
|
|
Jun 2 2005, 07:47 AM
Post
#5
|
|
|
apt-get moo ![]() Group: [MODERATOR] Posts: 2,053 Joined: 28-May 05 From: Hertfordshire, England Member No.: 7,593 ![]() |
If you do want to save it as .htaccess on XP then use Notepad to type the file, then click File, Save As. Then select all files from the drop down and type .htaccess as the file name. I've never had any problems doing it this way.
|
|
|
|
Jun 23 2005, 12:25 AM
Post
#6
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 63 Joined: 22-June 05 Member No.: 8,561 |
hi guys,
good topic, now i can make my own 404 error page now. Its good that trap 17 offeres custome 404, as many other free hosts i tried don'y AND their 404 error page is an add page that confuses my viewers. thanks for da service trap17. tthanks, jman/jerry |
|
|
|
Jun 23 2005, 02:20 AM
Post
#7
|
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,161 Joined: 9-May 05 From: Brisbane, QLD Member No.: 6,818 |
Does it matter where in .htaccess it goes cos mine is full of WordPress stuff and I've put it after
AuthName www.gapcommunity.trap17.com AuthUserFile /home/username/public_html/_vti_pvt/service.pwd AuthGroupFile /home/username/public_html/_vti_pvt/service.grp but it doesn't appear to be working. Also, should it be /public_html/wp-content/themes/custom/404.php or /home/username/public_html/wp-content/themes/custom/404.php? |
|
|
|
Jun 23 2005, 04:02 AM
Post
#8
|
|
|
Newbie [Level 3] ![]() ![]() ![]() Group: Members Posts: 47 Joined: 24-May 05 Member No.: 7,431 |
I really don't know much about it Tyssen,
but my guess would be, or what I would try is to put your 404.php file in a directory called "errors" under the public_html directory and then put the htaccess file also just inside the public_html directory and have it refer to /errors/404.php that way it should work as the error page for your entire page... does that help? |
|
|
|
Jun 23 2005, 04:37 AM
Post
#9
|
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,161 Joined: 9-May 05 From: Brisbane, QLD Member No.: 6,818 |
Your Wordpress installation comes with a 404 page with this in it:
CODE <?php get_header(); ?> Content <?php get_footer(); ?> Those includes are going to look for headers and footers within the WP content structure, so you must be able to get it to work for the paths that I've specified. |
|
|
|