cvs: phpweb / error.php

From: Date: Fri, 07 Nov 2003 18:20:43 +0000
Subject: cvs: phpweb / error.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-21867@lists.php.net to get a copy of this message
goba Fri Nov 7 13:20:43 2003 EDT Modified files: /phpweb error.php Log: Put this image redirectio to the right place Index: phpweb/error.php diff -u phpweb/error.php:1.13 phpweb/error.php:1.14 --- phpweb/error.php:1.13 Fri Nov 7 11:08:19 2003 +++ phpweb/error.php Fri Nov 7 13:20:43 2003 @@ -1,6 +1,6 @@ <?php -// $Id: error.php,v 1.13 2003/11/07 16:08:19 goba Exp $ +// $Id: error.php,v 1.14 2003/11/07 18:20:43 goba Exp $ /* @@ -25,8 +25,12 @@ $URI = urldecode(preg_replace("!(\\?.*$)!", "", $URI)); // ============================================================================ -// For images, display a 404 automatically (no redirect) -if (preg_match("!\\.(pdf|gif|jpg|png)$!i", $URI)) { error_404(); } +// Perform a redirect for manual figures, other images display a 404 automatically +if (preg_match("!^manual/(\\w+)/(print|printwn|tableless)/figures/(.+)$!", $URI, $parts)) { + mirror_redirect("/manual/$parts[1]/figures/$parts[3]"); +} elseif (preg_match("!\\.(pdf|gif|jpg|png)$!i", $URI)) { + error_404(); +} // ============================================================================ // BC: handle .php3 files that were renamed to .php @@ -89,11 +93,6 @@ } include $_SERVER['DOCUMENT_ROOT'] . "/manual/$parts[1]/index.php"; exit; -} - -// Rediretion for printed page image displays -elseif (preg_match("!^manual/(\\w+)/(print|printwn|tableless)/figures/(.+)$!", $URI, $parts)) { - mirror_redirect("/manual/$parts[1]/figures/$parts[3]"); } // ============================================================================

« previous php.mirrors (#21867) next »