question about 404 and htaccess

Discussion in 'PHP' started by izlik, Jun 2, 2007.

  1. #1
    i dunno if this is php or the html forum it should be in, im unsure here, but here i go.


    i was told by my webhost that i have to put a 404.php/html/whatever file in my webroot (made one already) and then add a string of code to my .htaccess file to make the standard 404page become the one i made.

    now i wonder what this string of code i should put in my .htaccess file should be, i tryed searching google without luck :<

    anyone that can help me ?
     
    izlik, Jun 2, 2007 IP
  2. dipoer

    dipoer Guest

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you have a cpanel on your host, you can do that without coding.
     
    dipoer, Jun 2, 2007 IP
  3. e_hippie

    e_hippie Guest

    Messages:
    32
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    ErrorDocument 404 /404.php
     
    e_hippie, Jun 2, 2007 IP
  4. izlik

    izlik Well-Known Member

    Messages:
    2,399
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    185
    #4
    i do have Cpanel but they said it wouldent work with that, where in Cpanel can i change it? so i just can test if the support is full of BS
     
    izlik, Jun 2, 2007 IP
  5. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #5
    Depends on the version of CPanel, the one I'm looking at has a link "Custom Error Pages" under the subheading "Site Management". However searching for this in Google should find a tutorial that might help you if you still can't find it.

    Doing this with .htaccess is a better option though in my opinion (if you know how to do it). e_hippie has shown how simple the code is anyway.
     
    krt, Jun 2, 2007 IP