Custom 404

viskon

New Member
Messages
2
Reaction score
0
Points
0
Hey guys, I'm new here, and couldn't find another forum to post this in, and couldn't find a thread that answered my question, and this seemed like the most approrpriate one so here goes nothing.
Does anyone know how to create a custom 404 page using the x10hosting CP? Help is appreciated. Thanks.
 

LHVWB

New Member
Messages
1,308
Reaction score
0
Points
0
Find the option which says "error pages" in your Cpanel under the advanced box/category, this allows you to easily create an error page for a range of different apache errors.

You could also upload a file to your 'public_html' folder called .htaccess, here is a tutorial which discusses making 404 error pages with that.

http://www.yourhtmlsource.com/sitemanagement/custom404error.html
 
Last edited:

viskon

New Member
Messages
2
Reaction score
0
Points
0
Thanks for the reply.
I've tried both recommendations above - creating a .htaccess file that points to 404page.htm in the public_html directory, and using the error page facility. Both still yield no results. Any ideas why?

For the record, .htaccess says "ErrorDocument 404 /404page.html" and 404page.html just says "Not found, go back". Trying a nonexistent page on my site however just leads to the "Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request." message, or the x10hosting ad 404 page. (By the way, what is the distinction between when those pages appear?)
 

jjpeacha

New Member
Messages
125
Reaction score
0
Points
0
Hiya viskon,

Well, I had exactly the same problem as you however I was able to work it out. Incase you haven't been able to here is what I did.

  1. I created a text document and called it htaccess.txt
  2. I then typed this into it:
    Code:
    ErrorDocument 404 /404.html
    make sure you change the /404.html to the folder destination and correct file name.
  3. upload it to your public_html folder (basicly where your index file is!)
  4. rename it to ".htaccess" (without quotes) - depending on your ftp browser it may disappear. If it says there is already a file in the folder with that name make sure you replace it with your new one!

That works for me a treat, you can see it working here: http://jc-studios.co.uk/adsda.htm (albeit not the best of 404 pages though!!)

Hope this helps you!!

=]
 
Last edited:

jjpeacha

New Member
Messages
125
Reaction score
0
Points
0
Cant you just click error pages on the cPanel? and then modify it?

I always find its better to learn how things like this are done just incase you dont have something like the cpanel which makes life easier.
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
really? I have them.... I think...
 

kbjradmin

New Member
Messages
512
Reaction score
2
Points
0
this is how i set up my error pages

just create a file called .htaccess or if you already have one, add these lines of code:
Code:
ErrorDocument 400 /400.php
ErrorDocument 401 /401.php
ErrorDocument 403 /403.php
ErrorDocument 404 /404.php
ErrorDocument 500 /500.php
then just create files 400.php, 401.php, 403.php, 404.php, and 500.php

this can be done in the main directory or specificly per directory.
 
Last edited:
Top