cvs: phpweb /error index.php

From: Date: Tue, 25 Sep 2001 18:39:31 +0000
Subject: cvs: phpweb /error index.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-6688@lists.php.net to get a copy of this message
jimw Tue Sep 25 14:39:31 2001 EDT Modified files: /phpweb/error index.php Log: use Status: header, but don't need it for redirects. Index: phpweb/error/index.php diff -u phpweb/error/index.php:1.32 phpweb/error/index.php:1.33 --- phpweb/error/index.php:1.32 Sat Sep 22 04:20:33 2001 +++ phpweb/error/index.php Tue Sep 25 14:39:31 2001 @@ -3,7 +3,7 @@ function make404() { global $REQUEST_URI; - header('HTTP/1.0 404 Not Found'); + header('Status: 404 Not Found'); header("Cache-Control: public, max-age=600"); commonHeader('404 Not Found'); echo "<h1>Not Found</h1>\n"; @@ -34,7 +34,6 @@ } $urle = htmlspecialchars($url); - header("HTTP/1.0 302 Redirect"); header("Location: $url"); print "<html><title>Redirect to $urle</title><body>"; @@ -51,7 +50,6 @@ } $urle = htmlspecialchars($url); - header("HTTP/1.0 302 Redirect"); header("Location: $url"); print "<html><title>Redirect to $urle</title><body>"; @@ -76,22 +74,11 @@ $try = find_manual_page($lang, $function); if ($try) { - header("HTTP/1.0 302 Redirect"); header("Location: $try"); exit; } -# If all else fails ... redirect to the search page with the pattern set to $REQUEST_URI - -if ($REQUEST_URI) { - header('HTTP/1.0 302 Redirect'); - header('Location: /search.php?show=nosource&pattern='.urlencode(substr($REQUEST_URI,1)) ); - exit; -} - -make404(); -exit; - - +# redirect to the search page with the pattern set to $REQUEST_URI +header('Location: /search.php?show=nosource&pattern='.urlencode(substr($REQUEST_URI,1)) ); ?>

« previous php.mirrors (#6688) next »