note 106142 modified in reserved.variables.server by danbrown

From: Date: Thu, 13 Oct 2011 18:00:11 +0000
Subject: note 106142 modified in reserved.variables.server by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-183864@lists.php.net to get a copy of this message
A simple function to detect if the current page address was rewritten by mod_rewrite: <?php public function urlWasRewritten() { $realScriptName=$_SERVER['SCRIPT_NAME']; $virtualScriptName=reset(explode("?", $_SERVER['REQUEST_URI'])); return !($realScriptName==$virtualScriptName); } ?> --was-- A simple function to detect if the current page address was rewritten by mod_rewrite: public function urlWasRewritten() { $realScriptName=$_SERVER['SCRIPT_NAME']; $virtualScriptName=reset(explode("?", $_SERVER['REQUEST_URI'])); return !($realScriptName==$virtualScriptName); } http://php.net/manual/en/reserved.variables.server.php

« previous php.notes (#183864) next »