This mod issues a 404 status code that does not change the URL while displaying a TNG page. The mod replaces all occurrences of thispagedoesnotexist.html with a function. Any links to people, families, media, cemeteries, places etc. is captured. This is a true 404 status code and not a "soft" 404 code where a page is shown or redirected resulting with a 200 page OK status code.
The way the page is displayed is dependent on the 404_page.php file. If the file is in the TNG root folder, additional content is shown. If it is not found a generic 404 page is shown. The 404_page.php file can be customized to show additional message or links. If the 404_page.php is used, languages must be added to the cust_text.php file for the active language(s). Examples of the text format is included in the message_examples.php file.
By default the mod displays the error and a TNG page.
Administrators can change the message to something else.
Administrators can also use a separate file to display links of other messages.
Links can also be placed inline.
You can check the network status code yourself by opening the browsers inspection window and select Network.
Select the reload option to display the page status information. The page must be reloaded because the status code is only sent when the page loads.
The URL on the first line displays a 404 status code and there is a one warning at the top. The remainder of the page will show a 200 status which is normal because some page content loaded. The 404 code tells users, bots and crawlers the URL is unavailable so bots and crawlers will not store the URL address.
The 404 error log lets administrators know about bad links. Keep in mind hack attempts will also be shown if someone modifies the URL. The URL will contain unusual characters and commands like AND, OR and UNION. The error log can be disabled in mod options.
TNG WIKI Download Link
25 Dec 2023 - Changed inline CSS styling so mytngstyle.css can override the default CSS. Added more instructions for creating a custom 404 page.
22 Dec 2023 - Reworked mod so 404-page.php file is optional. Fixed code so users can change the default error message without using the 404-page.php
file. Added an example text file so users can add their own messages to the custtext.php file(s) for the language(s) they are using.18 Dec 2023 - Added an error log file
16 Dec 2023 - First public release