Results 1 to 5 of 5

Thread: php custom 404 error page

  1. #1
    Join Date
    Jul 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default php custom 404 error page

    my free webhost dont offer custom 404 error page and they disabled the function of redirecting error page using htaccess is it possible to have a custom 404 error page embedding it to php? thanks!

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    No, you need access to a working .htaccess file or the server's httpd.conf file.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jul 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    how do you create a custom error page if you have access to a .htaccess file??

  4. #4
    Join Date
    Jul 2006
    Location
    New York
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default server file

    hi

    it is basically a serverfile which we don't use very often.


    Regards
    Chronis Tsempelis
    Marketraise Corp.

  5. #5
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by spider1405
    how do you create a custom error page if you have access to a .htaccess file??
    Use the ErrorDocument directive:

      ErrorDocument error-code document

    where error-code is the response status code to be handled (404, 410, etc.), and document is either a quoted string or a URL (absolute, or absolute path) to the document to be returned.

    The Apache documentation for the ErrorDocument directive contains more information and a few examples.

    Mike

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
  •