note 31194 deleted from ref.apache by tomsommer

From: Date: Tue, 03 Aug 2004 16:45:50 +0000
Subject: note 31194 deleted from ref.apache by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-73852@lists.php.net to get a copy of this message
Note Submitter: crikou@xsilence.net ---- In reply to henk_nicolai, who is talking about the annoying apache behaviour. First, thanks for your help nicolai. I've been testing your script, but finally decide to use this one : if (strstr(strstr($_SERVER['REQUEST_URI'],".php"), "/")) { header ('Location: 'http://' .$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']); exit(); } As apache is working on the first ".php" extension it finds, any slashes found after the extension is not welcome, and shouldnt be there (except if you have already implemented a / parser for beautiful urls) So I guess this little code always works Hope this helps !

« previous php.notes (#73852) next »