Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: cutom 404 error pic

  1. #1
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default cutom 404 error pic

    I have a website (modernrevolutions.net) and when a page is messed up instead of it saying the default 404 error thing i want to make it a blank page with just a pic. Is there a code for that or something? What do i have to do?

  2. #2
    Join Date
    Jul 2007
    Location
    Azerbaijan, Baku
    Posts
    144
    Thanks
    11
    Thanked 27 Times in 25 Posts

    Default

    1. Make .htaccess document.
    2. Write there:
    Code:
    ErrorDocument 404 /yourfile.html
    3. Make file that you writed.

    P.S. yourfile.html - changeable

  3. The Following User Says Thank You to allahverdi For This Useful Post:

    techietim (07-03-2008)

  4. #3
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    It is also likely that your web host either
    ...1)has a feature that will do this for you automatically, or
    ...2)has a feature that does not allow you to do it at all.

    Ask them before spending too much time on it.

  5. #4
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default

    http://www.modernrevolutions.net/wrong go to that too see what comes up when it says 404 error. I tried to put <style>ErrorDocument 404 /layout/error.html and it didnt work :/ what do i do?

  6. #5
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    well, since I get the normal 404 page, I couldn't tell you what might be wrong with your code. However, it seems you are hosted by 1and1 Internet...?

    If so, the solution is simple, and you don't need to write your own .htaccess file. (Unless you're running the "Beginner" package, which doesn't support custom 404 pages at all.)

    If you're running the "Home" package or higher, all you need to do is create your error page, name it "error404.html", and upload it to your root directory via FTP. 1and1 will write the .htaccess file for you automatically.

  7. #6
    Join Date
    Jul 2007
    Location
    Azerbaijan, Baku
    Posts
    144
    Thanks
    11
    Thanked 27 Times in 25 Posts

    Default

    IllustriousLyts, <style>ErrorDocument 404 /layout/error.html you wrote it?

    Go to top you will see, you need:
    Code:
    ErrorDocument 404 /layout/error.html
    Without <style>.

    And traq is correct too...

  8. #7
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default

    the .html thing worked but it only works with mozilla and not IE. its werid :/

  9. #8
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    it seems you have only:
    Code:
    <center><a href="http://www.modernrevolutions.net"><img src="http://www.modernrevolutions.net/404images/heleft.png" border="0px"></a><br>click the pic to go back</center>
    i'd start by adding the <html>, <head>, and <body> tags to your page. that might improve things a bit.

  10. #9
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default

    I tried alot and its not working in IE still lol here is the link www.modernrevolutions.net/wrong

  11. #10
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    When I look at your 404 source, all I see is this:
    Code:
    <title>modern revolutions&trade; WHOOPS!!! </title>
    <style>body {background-color:131313;}</style>
    <center><a href="http://www.modernrevolutions.net"><img src="http://www.modernrevolutions.net/404images/sorry.png" border="0px"></a><br></center>
    Try adding complete html page formatting, like so:
    Code:
    <html>
    <head>
    <title>modern revolutions&trade; WHOOPS!!! </title>
    <style>body {background-color:131313;}</style>
    </head>
    <body>
    <center><a href="http://www.modernrevolutions.net"><img src="http://www.modernrevolutions.net/404images/sorry.png" border="0px"></a><br></center>
    </body>
    </html>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •