How do I change the main 404 template on a dedicated server for all the site on it?

Discussion in 'Site & Server Administration' started by Dollar, Jul 5, 2008.

  1. #1
    I'm wondering how to change the 404 & 403 template. I have a dedicated server. I know how to change it for one account but this is time consuming.


    I would like to edit the main template so that it works across the whole server on all the sites on the server. Where do I edit?

    Thanks for anyones help in advance.
     
    Dollar, Jul 5, 2008 IP
  2. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #2
    you failed to give tech details needed for a precise reply / solution,
    hence an indirect reply that helps you to find the details all on your own:

    if you would have an apache2 server - then you have your site wide default configuration handling such files
    one default file for each and every error = hence one for 404 and another one for 403. but of course they may point to the same file if you wish so.

    on a server with multiple accounts - it usually is left to each account to either use the system wide default in absense of a account specific 404 file
    or
    to create a custom 404 file on each account

    on an apache server this custom 404 typically is system defines as
    /missing.html

    hence at domain root you place a file with that name and place ANY content you wish and feel appropriate into that
    /missing.html file

    if for example you have Google site search or your own search engine - then it might be a good method to place a search into your custom 404 file to allow surfers to find on YOUR site what they wanted. typically the 404 errors often occurs as a result of
    - spell error if they TYPE a URL into browser ( caSe ErRors )
    - copy and paste errors when copying your URL from somewhere else ( a space appended in the copy/paste procedure often results in 404 even if all remaining is correct ...

    also a good idea may be to have a contact FORM ready where the 404 surfer may report the missing URL to you without using eMail or any spam filters.

    to simple put "page NOT found" on a custom 404 page is a poor choice.
     
    hans, Jul 5, 2008 IP