Hello, i was wondering if someone would be able to tell me how to edit the 404 error page serverwide. Like hostgator does. I want to place ads on them pages to earn some extra revenue. I still want my clients to be able to change it if they want but the default i want it to be google ads on every site that is installed on the server.
in apache 2.2 you have a global config file errors.conf and would UN-comment or if missing - add the line: ErrorDocument 404 /missing.html where you may replace the filename for missing.html by the actually used filename that you plan to let appear in a 404 situation. then you CREATE that file - add whatever you want - a good idea always is to add a SITE-search since often or most of the missing file errors come from misspelled URLs when ppl hand-type an URL and have misspelling or cAsE-wrong in URL re ads on 404 pages make sure that procedure complies with current TOS of the ad-server you want to have displayed. if you have NO dedicated server - then you have NO access to that apache file, hence you would add the same line into your .htaccess file at domain root level! a tip: since such a page typically has boring and limited content it is a good procedure to SSI a RSS feed that has a spicy and changing content - SSI = NO javascript !! hence you make this newsfeed content permanent part of the missing.html page - and get ever changing keywords for relevant ads