cvs: phpweb /error index.php

From: Date: Sun, 03 Feb 2002 10:58:33 +0000
Subject: cvs: phpweb /error index.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-8453@lists.php.net to get a copy of this message
goba Sun Feb 3 05:58:33 2002 EDT Modified files: /phpweb/error index.php Log: Try to add support for php.net/links kind of URLS for php.net/links.php Just for support people [incl. me] to have shortcuts => type less ;) This makes all .php files accessible without the php extension (also means we sould be careful not to name directories and files with the same name in phpweb). I'll see if this works at all, or needs some rethink Index: phpweb/error/index.php diff -u phpweb/error/index.php:1.33 phpweb/error/index.php:1.34 --- phpweb/error/index.php:1.33 Tue Sep 25 14:39:31 2001 +++ phpweb/error/index.php Sun Feb 3 05:58:33 2002 @@ -57,9 +57,15 @@ exit; } +# prepare URI for manual page and PHP page shortcuts $uri=substr($REDIRECT_REDIRECT_ERROR_NOTES,strpos($REDIRECT_REDIRECT_ERROR_NOTES,$DOCUMENT_ROOT)+strlen($DOCUMENT_ROOT)+1); if ($uri[0] == "/") $uri = substr($uri,1); + +# handle common page shortcuts, like docs, links, support, etc. +if (file_exists("$DOCUMENT_ROOT$uri.php")) { + header("Location: http://$SERVER_NAME$uri.php"); +} # try to find the uri as a manual entry

« previous php.mirrors (#8453) next »