note 31829 added to ref.http

From: Date: Mon, 05 May 2003 15:35:02 +0000
Subject: note 31829 added to ref.http
Groups: php.notes 
Request: Send a blank email to php-notes+get-47550@lists.php.net to get a copy of this message
I wanted to do an http redirect taking into account their current uri: ie. authentication failed - redirect to login.php $NewPage = 'login'; $NewURL = preg_replace( "[\w+(?=\.php)]", $NewPage, $_SERVER[ "SCRIPT_URI" ] ); header( "location: $NewURL\r\n" ); Hope this might be useful for someone. -- http://www.php.net/manual/en/ref.http.php http://master.php.net/manage/user-notes.php?action=edit+31829 http://master.php.net/manage/user-notes.php?action=delete+31829 http://master.php.net/manage/user-notes.php?action=reject+31829

« previous php.notes (#47550) next »