Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Oct 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Custom 404 pages

    I have my own personal server, and a online server that I can use to host websites, and I was wondering how I would make it so that I could get a customized 404 error page

  • #2
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    What web server does your server run?

  • #3
    Regular Coder
    Join Date
    Nov 2004
    Location
    Edinburgh, SCO
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey,

    create a file called ".htaccess" (just that) and write the following in it:

    Code:
    ErrorDocument 404  /my404error.html
    and put it in your root directory.

    Frank

  • #4
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    That's only on Apache Web Server, that doesn't work on IIS.

  • #5
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts
    you dont even need to bother with .htaccess on iis, just go to the iis default website properties and set custom errors (also in asp you can set a 404 pretty easily for whichever files, separately (its just a server.transfer to the location of the file in custom errors anyway.. there is probably something similar in php to do this and end execution after its run but i wont go into the details since im not very good at php and its easier to just do it on the server anyway.. im pretty sure you can set custom errors on apache/tomcat but my server is ws2k3 so ive never tried

  • #6
    Banned
    Join Date
    Dec 2004
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool im a bgeinner

    but dont u just name the page like 404.htm or somthing like tht i think i dont realy kno

    please dont ava go if im wrong


  •  

    Posting Permissions

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