Re: passing parameters in the url using forward slashes
| From: | Thomas Hurst | Date: | Wed, 09 May 2001 15:07:15 +0000 |
| Subject: | Re: passing parameters in the url using forward slashes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-52115@lists.php.net to get a copy of this message | ||
On 9 May 2001 05:05:30 -0700, fv@ebiris.se ("Franklin van Velthuizen")
wrote:
> Good morning/afternoon/evening.. whatever timezone you live in :)
>
> Small question: we all know how to pass parameter using question marks in an URL ofcourse..
> but I was wondering whether it was also possible to pass parameters in the URL using forward
> slashes instead of those question marks, so like:
>
> http://blabla/file.php/value
>
> and use "value" as a parameter, obviously.
This has been known to work on some setups out of the box (like mine :),
but the best way to do it is probably to use mod_rewrite. This takes an
url and, er, rewrites it to point at your script.
However, you have to parse the URL yourself, it'll be in
$HTTP_SERVER_VARS[REQUEST_URI];
--
Thomas 'Freaky' Hurst - freak@aagh.net - http://www.aagh.net/