New "Page Not Found" (404) Page

Tags
404, not found, web programming

 
Thread Tools Search this Thread
# 1  
Old 11-18-2018
New "Page Not Found" (404) Page

Made some changes to the forum, so when a page is not found and generates a 404 error, the site redirects to "Today's Posts" page and added a "Not Found" message:

Code:
<?php
header('HTTP/1.0 404 Not Found', true, 404);
header("Location: https://www.unix.com/search.php?do=getdaily&redirect=404");
die();
?>

Results, for example:

Image
This User Gave Thanks to Neo For This Post:
rbatte1 (11-23-2018)

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9" jcdole Shell Programming and Scripting 1 2 Hours Ago 06:37 AM
Using "mailx" command to read "to" and "cc" email addreses from input file asjaiswal UNIX for Dummies Questions & Answers 2 10-11-2014 10:32 PM
CGI not working with httpd server on busybox 1.15.0 on ltib Linux 2.6.34 (404 page not found) Roboserg Web Programming 1 12-14-2012 04:52 PM
script for adding page number before page breaks antman Shell Programming and Scripting 9 09-21-2012 06:37 AM
Print multiple copies page by page using lp command megha2525 Shell Programming and Scripting 7 04-20-2012 01:56 PM
awk command to replace ";" with "|" and ""|" at diferent places in line of file shis100 Shell Programming and Scripting 7 03-16-2011 09:59 AM
"Elements per page"... seeking ideas... treesloth Shell Programming and Scripting 2 02-21-2011 02:02 AM
Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" Lokesha UNIX for Dummies Questions & Answers 4 12-20-2007 01:52 AM