cvs: docweb /include init.inc.php

From: Date: Tue, 18 Jan 2005 15:10:24 +0000
Subject: cvs: docweb /include init.inc.php
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-489@lists.php.net to get a copy of this message
sean Tue Jan 18 10:10:24 2005 EDT Modified files: /docweb/include init.inc.php Log: more fixed for URL break on 404 http://cvs.php.net/diff.php/docweb/include/init.inc.php?r1=1.6&r2=1.7&ty=u Index: docweb/include/init.inc.php diff -u docweb/include/init.inc.php:1.6 docweb/include/init.inc.php:1.7 --- docweb/include/init.inc.php:1.6 Sun Nov 28 17:12:23 2004 +++ docweb/include/init.inc.php Tue Jan 18 10:10:24 2005 @@ -18,7 +18,7 @@ | Gabor Hojtsy <goba@php.net> | | Sean Coates <sean@php.net> | +----------------------------------------------------------------------+ -$Id: init.inc.php,v 1.6 2004/11/28 22:12:23 sean Exp $ +$Id: init.inc.php,v 1.7 2005/01/18 15:10:24 sean Exp $ */ error_reporting(E_ALL); @@ -46,7 +46,12 @@ define('LANGD', $LANGUAGES[LANGC]); // set up BASE_URL - if (substr($_SERVER['REQUEST_URI'], -1, 1) == '/') { + if (isset($_SERVER['REDIRECT_STATUS']) && + $_SERVER['REDIRECT_STATUS'] == '404') { + // 404 error, revert to /project/language + $baseURL = '/' . SITE . '/' . LANGC . '/'; + + } elseif (substr($_SERVER['REQUEST_URI'], -1, 1) == '/') { // is a directory, use verbatim $baseURL = $_SERVER['REQUEST_URI']; } else {

« previous php.doc.web (#489) next »