+ Reply to Thread
Results 1 to 7 of 7
Like Tree2Likes
  • 1 Post By fethrdwlf82
  • 1 Post By morbid_leathal92

Thread: Creating a custom 404 page?

  1. #1
    fethrdwlf82 is offline x10Hosting Member fethrdwlf82 is an unknown quantity at this point
    Join Date
    Jun 2011
    Posts
    2

    Question Creating a custom 404 page?

    I have a website that currently doesn't have every page created that is affiliated with every link. That means "Link 1" may work, but "Link 2" might not. Therefore, I would like to create a custom 404 page. I have tried making a ".htaccess" file, and putting it on the root of my server, but it just doesn't work. What content should I put into the .htaccess? And, where should I put it?
    dinomirt96 likes this.

  2. #2
    loganjohngorence37 is offline x10Hosting Member loganjohngorence37 is an unknown quantity at this point
    Join Date
    Apr 2011
    Posts
    9

    Re: Creating a custom 404 page?

    Go to cPanel and Click Error Pages under Advanced and Edit the one you will want to show, like 404...
    EDIT: You may want to make it so then it shows all of the details and tells the user to try again later or email you at a certain email
    Last edited by loganjohngorence37; 06-16-2011 at 02:54 PM.

  3. #3
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Creating a custom 404 page?

    .htaccess goes into public_html

    To see dot files, you have to have them enabled in File Manager or your FTP program. If you don't enable them, they are there, you just won't see them.

    What I do.
    1. Create a folder error in public_html
    2. Create your pretty 404 page, name it 404.html and put it in error
    3. In the .htaccess file, add the line:

    ErrorDocument 404 /error/404.html

    4. Repeat for the other errors you might encounter (403 Forbidden, 500 Internal Server Error)

    5. If you want to use PHP, you can (file name 404.php, etc). If you know what you are doing, you can then customize the error message.
    Nothing is always absolutely so.

  4. #4
    manu.hotmail58 is offline x10Hosting Member manu.hotmail58 is an unknown quantity at this point
    Join Date
    Jul 2011
    Posts
    1

    Re: Creating a custom 404 page?

    Works Great! You may also add absolute path like:
    ErrorDocument 404 http://yourdomain.com/page.html


    Quote Originally Posted by descalzo View Post
    .htaccess goes into public_html

    To see dot files, you have to have them enabled in File Manager or your FTP program. If you don't enable them, they are there, you just won't see them.

    What I do.
    1. Create a folder error in public_html
    2. Create your pretty 404 page, name it 404.html and put it in error
    3. In the .htaccess file, add the line:

    ErrorDocument 404 /error/404.html

    4. Repeat for the other errors you might encounter (403 Forbidden, 500 Internal Server Error)

    5. If you want to use PHP, you can (file name 404.php, etc). If you know what you are doing, you can then customize the error message.

  5. #5
    morbid_leathal92 is offline x10Hosting Member morbid_leathal92 is an unknown quantity at this point
    Join Date
    Jan 2011
    Location
    Kathmandu
    Posts
    62

    Thumbs up Re: Creating a custom 404 page?

    it simply helped me create custom 404 error page. Thanks
    karimirt47 likes this.

  6. #6
    cheezo's Avatar
    cheezo is offline x10 Sophmore cheezo is an unknown quantity at this point
    Join Date
    May 2010
    Posts
    175

    Re: Creating a custom 404 page?

    where in .htaccess will i add it?

  7. #7
    m.stratford86's Avatar
    m.stratford86 is offline x10Hosting Member m.stratford86 is an unknown quantity at this point
    Join Date
    Jun 2011
    Location
    U.K.
    Posts
    18

    Re: Creating a custom 404 page?

    You can add it anywhere, as long as it isn't in the middle of another entry, so bet bet to add it to the end!

    If you find it useful, please give me rep!

+ Reply to Thread

Similar Threads

  1. Custom 404 page.
    By istore_admin in forum Free Hosting
    Replies: 6
    Last Post: 04-22-2010, 06:54 PM
  2. Creating custom userbars
    By Thewinator in forum The Marketplace
    Replies: 64
    Last Post: 11-07-2007, 04:39 AM
  3. Custom 404 page
    By panos95 in forum Free Hosting
    Replies: 3
    Last Post: 09-29-2007, 09:04 AM
  4. Creating custom PHP themes
    By Ferinos in forum Scripts & 3rd Party Apps
    Replies: 9
    Last Post: 12-12-2006, 02:03 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers