note 31194 added to ref.apache
| From: | crikou at xsilence dot net | Date: | Sat, 12 Apr 2003 21:11:27 +0000 |
| Subject: | note 31194 added to ref.apache | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-46553@lists.php.net to get a copy of this message | ||
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 !
--
http://www.php.net/manual/en/ref.apache.php
http://master.php.net/manage/user-notes.php?action=edit+31194
http://master.php.net/manage/user-notes.php?action=delete+31194
http://master.php.net/manage/user-notes.php?action=reject+31194