Jacob
Jul 18 2008, 09:46 AM
A cool trick you can entice your visitors with is custom error pages. When a page on your server is not found, your visitors will normally see their browser's default message such as "Page cannot be displayed." If you used a custom error page though, your visitors will see your page.
404 Error pages will ONLY work if you are using it on a domain. Sub-domains (something.your-site.com or
http://www.your-site.com/something) will NOT work.
Here's How:
1. Create an HTML file for your 404 page. It could be anything you would like. It could be just simply 404 on a blank page.. or it could be your layout that includes the 404 words in it.. it's all up to you.
2. Save that file in any file format you want (html, php etc;) and upload it to your webserver. You can either keep it in your main or root directory, or you can create a subfolder. If you're only going to be using one (404) then I suggest just leaving it in your root folder.
3. Press start > Run > type "notepad" (in mac, just open a text editor) now you will take this code below, and put it into your text editor:
CODE
ErrorDocument 404 http://www.yoursite.com/404.htm
4. Remember, change the URL in the above code to the path of your 404 page on your server.
5. Now file > save as > htaccess.txt | save it somewhere that you will remember.
6. Upload the
htaccess.txt folder to your webserver. (Make sure it's in the home or root directory)
7. Rename the file (will be different for different ftp clients) to
.htaccess (make sure there is a "." before htaccess and NO ".txt" after htaccess)
8. And there you go! You should be good to go. There are also other error pages available such as internal error, forbidden etc; search google for these .. and then its just a matter of adding that code to your .htaccess file and making another error document (like your 404 page).
Any questions?
Jacob.
alandu
Sep 1 2008, 01:14 PM
Nice tutorial, but I have a problem.
I know you said I can't create error pages with sub domains...
Then how come I found a website that can do it with sub domains:
http://kingsnetwork.myvnc.com/So if you typed
http://kingsnetwork.myvnc.com/blahblah8y4235234It comes with an customised error page.
And I can't! =[
Please help.
Thanks.
Brandon
Sep 1 2008, 01:38 PM
i was going todo a tutorial on this
wozzym
Sep 1 2008, 03:20 PM
wow thats a lot simpler than I thought.
DJPazze
Sep 1 2008, 04:31 PM
Thanks for the info! (tutorial)
Simple, simple, simple!
Yaveo
Sep 2 2008, 07:21 PM
so, this wont work on zymic? or will it ??
swordz
Sep 2 2008, 07:53 PM
This will work on zymic servers.
swordz
Jacob
Sep 3 2008, 09:21 AM
So instead of getting a generic 404, you can have it jazzed up and to the theme of your site!
Jacob.
Andrew-C
Sep 7 2008, 06:10 PM
is there anyway that this could be setup so if say vndv was down i could host it on another server and it would say please go here.
wozzym
Sep 7 2008, 06:55 PM
if vndv is down your site can't be accessed. the page will just expire...so no.
Passion
Sep 20 2008, 07:34 AM
Great Tutorial
Keep Providing more..
burgly
Oct 4 2008, 09:00 PM
I know nothing of Html, Php, Mysql, and I'm new to Zymic, but I do know logic.
So, couldn't you add a seperate Htaccess File for your subdomain?
Sickness
Oct 4 2008, 10:58 PM
you can also create a page for "when the server is too busy" but it's a different number, and I don't remember which one it is.
swordz
Oct 4 2008, 11:04 PM
500.13. A full list is
here. And there's far more than I thought there were...
swordz
caseymadaline
Oct 8 2008, 02:28 AM
Nice tutorial. It looks pretty simple. I'll give it try.
estuartie
Oct 8 2008, 09:32 AM
Hiya - great tutorial -I always wondered how it was done - so it's time to play around some more!!
Thanks
Stu
Does anyone have the code to do a small shoutbox that will fit into a sidebar just so people can leave comments on the site
cheers
Stu
byluiz
Oct 8 2008, 03:35 PM
ty
IamShipon1988
Oct 8 2008, 09:13 PM
I never really had to create so many error pages. I just set my servers language to Chinese for fun. It was great.
tomming
Oct 26 2008, 03:08 AM
You can also try htaccess editor (www.htaccesseditor.com/en.shtml)
easy..
MASTER MIST
Nov 21 2008, 11:50 PM
i can't use mine for some reason this is ticking me off ~.~ i thought i could use this place for a page for me and my friends to have our favorate stuff
MrTouz
Nov 24 2008, 11:47 PM
Just an other tip :
If you want to use images in your 404 it is suggested to put the full path of the image
http://www.mysite.com/images/404.png for example and not images/404.png.
It sounds logical and not logical at the same time for me..but oh well.
MH-Dolly
Dec 9 2008, 03:31 PM
thanks! I will use it when I go home!
MicJames
Dec 10 2008, 02:45 AM
That is really useful and well explained, thanks!
akpokemon
Dec 23 2008, 12:14 AM
Thank you so much! How cool!

But I have a problem!

I made an error on my first .htaccess file, and after I renamed it, it became invisible on Filezilla.

Then when I followed these steps again to get a working .htaccess file, it wouldn't let me rename my htaccess.txt file to .htaccess in the FTP. It says:
CODE
550 RENAME Failed - destination file already exists
Well, snap.

Could someone please tell me how to delete the existing .htaccess file so I can replace it with the working one? Thank you!

--
akpokemonEDIT: Sorry for the smilies overload.
Roee
Dec 23 2008, 07:03 PM
QUOTE(akpokemon @ Dec 23 2008, 12:14 AM)

But I have a problem!

I made an error on my first .htaccess file, and after I renamed it, it became invisible on Filezilla.

Then when I followed these steps again to get a working .htaccess file, it wouldn't let me rename my htaccess.txt file to .htaccess in the FTP. It says:
CODE
550 RENAME Failed - destination file already exists
Well, snap.

Could someone please tell me how to delete the existing .htaccess file so I can replace it with the working one? Thank you!

You can use the "File Manager" in your account control panel and delete the file from there.
akpokemon
Dec 24 2008, 01:18 AM
QUOTE(Roee @ Dec 23 2008, 02:03 PM)

You can use the "File Manager" in your account control panel and delete the file from there.
Oh...jk. Not compatible with sub-domains. Wow. Ha. Okay. Thanks, though!
Would it work if I got a free domain like
co.cc or something like that?
Thanks
M-Optimizer
Jan 11 2009, 05:15 AM
I don't know why it doesn't work for me.
Abdes Samad
Jan 11 2009, 11:23 AM
If it will work, all would be nice
myjunkie
Jan 12 2009, 09:49 AM
Great tutorial!
primatage
Feb 18 2009, 03:12 AM
PROBLEM:
Several people have posted asking why this does not work with free hosting accounts here on zymic, and yet no one has answered them.
Can somebody PLEASE help us all? Why won't the file manager allow upload of any file resembling an htaccess file to any folder besides root?
I for one would be extremely grateful to anyone who can clear this up for the people that the tip didn't miraculously work for.
Sir Graystar
Mar 9 2009, 06:16 PM
This doesn't really work for me. If I get a 404 error straight from the root directory (e.g mysite.com/rg4325) then it goes to the uuuq 404 page, but if I get one from index.php (e.g mysite.com/index.php/rg4325) then it does work. Help anyone?
Jenniferlinn
Mar 12 2009, 07:01 AM
QUOTE(NaRzY @ Jul 18 2008, 09:46 AM)

A cool trick you can entice your visitors with is custom error pages. When a page on your server is not found, your visitors will normally see their browser's default message such as "Page cannot be displayed." If you used a custom error page though, your visitors will see your page.
404 Error pages will ONLY work if you are using it on a domain. Sub-domains (something.your-site.com or
http://www.your-site.com/something) will NOT work.
Here's How:
1. Create an HTML file for your 404 page. It could be anything you would like. It could be just simply 404 on a blank page.. or it could be your layout that includes the 404 words in it.. it's all up to you.
2. Save that file in any file format you want (html, php etc;) and upload it to your webserver. You can either keep it in your main or root directory, or you can create a subfolder. If you're only going to be using one (404) then I suggest just leaving it in your root folder.
3. Press start > Run > type "notepad" (in mac, just open a text editor) now you will take this code below, and put it into your text editor:
CODE
ErrorDocument 404 http://www.yoursite.com/404.htm
4. Remember, change the URL in the above code to the path of your 404 page on your server.
5. Now file > save as > htaccess.txt | save it somewhere that you will remember.
6. Upload the HTACCESS.TXT folder to your webserver. (Make sure it's in the home or root directory)
7. Rename the file (will be different for different ftp clients) to .HTACCESS (make sure there is a "." before HTACCESS and NO ".txt" after HTACCESS)
8. And there you go! You should be good to go. There are also other error pages available such as internal error, forbidden etc; search google for these .. and then its just a matter of adding that code to your .htaccess file and making another error document (like your 404 page).
Any questions?
Jacob.
Hello Jacob
Thanks for the tutorial , let me try it on my machine then i will be back with my feedback
farhome
Jun 7 2009, 07:13 AM
oo this is what i'm looking for. by the way i guess we can do this is Cpanel, is it not?
alicia8522
Aug 2 2009, 02:06 AM
Excellent information - thank you. I will definitely recommend your post to my friends. Nice trick !
Jacob
Aug 2 2009, 04:56 AM
QUOTE(farhome @ Jun 7 2009, 05:13 PM)

oo this is what i'm looking for. by the way i guess we can do this is Cpanel, is it not?
cPanel accounts (Zymic does not currently provide) does have the error pages module installed and is easily customisable.
Jacob.
Jacob
Oct 20 2009, 01:35 PM
Just for the record, this has been tested and works fine on Zymic servers. You just need to make sure all files are correctly named and uploaded before attempting to test it.
lynndalton
Dec 8 2009, 09:37 AM
Hey...
Thanks for providing such a wonderful stuff. Its really informative thread. This is interesting issue, Hope many members get more information through this thread....
jordan k hu
Dec 21 2009, 07:12 PM
Works on my subdomain!
True
Dec 22 2009, 10:35 AM
Hi, This has not worked for me. I did exactly how it said and it still comes up with the zymic 404....any reason why that comes up. My .HTACCESS file ( named exacltly that) says: "ErrorDocument 404
http://true.zxq.net/404.html" Without quotes. I uploaded it and renamed to .HTACCESS And then i tested ......it comes up with
http://www.hosting.zymic.com/404/And i want it to come up with:
http://true.zxq.net/404.htmlAny help?
Thanks
True
QUOTE(True @ Dec 22 2009, 10:35 AM)

Hi, This has not worked for me. I did exactly how it said and it still comes up with the zymic 404....any reason why that comes up. My .HTACCESS file ( named exacltly that) says: "ErrorDocument 404
http://true.zxq.net/404.html" Without quotes. I uploaded it and renamed to .HTACCESS And then i tested ......it comes up with
http://www.hosting.zymic.com/404/And i want it to come up with:
http://true.zxq.net/404.htmlAny help?
Thanks
True
Needs to be all lowercase: .htaccess
True
Dec 22 2009, 05:18 PM
Thanks alot ed!
True
Mattyski
Jan 8 2010, 01:37 PM
Thanks for the 404 Tip.
Now to find out if it can be used as a hit counter?...
Matt
ssfdre38
Feb 6 2011, 08:09 PM
make sure you name it .htaccess and not .HTACCESS for it to work
sherryabhy
Mar 10 2011, 04:25 AM
you can also generate a page for "when the server is busy" but it is a different number, & I don't keep in mind which one it is. I will share its information latter on here.
kamlanegi
May 18 2011, 09:34 AM
Hi,
I think 404 error is the Error message when our webpage is permanently remove. If i am worng then help we.
Its good one but need more explaination..
Regards,
Kamla Negi
ssfdre38
May 18 2011, 04:09 PM
make an .htaccess file and in it you add ErrorDocument 404 path/to/404
ielts7band
Jun 8 2011, 10:26 AM
hi!
i want to know that would i have to make the individual custom error pages for all 404 error pages?
Black Eagle
Jun 8 2011, 06:48 PM
The code can be working on the whole site, so you'll be having one 404 error page, just add a path to it.
sharunks007
Oct 6 2011, 08:50 AM
Thanks a lot!!!

It's working on my custom domain too ^.^
shnooky
Oct 12 2011, 03:43 PM
Thanks for the help, the steps seem alot easier than I had expected.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.