Using '/' instead of '?' in url querystring
| From: | Kenni Graversen | Date: | Mon, 07 Oct 2002 13:31:05 +0000 |
| Subject: | Using '/' instead of '?' in url querystring | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-119072@lists.php.net to get a copy of this message | ||
Hi,
I wonder if any of you have experience, sending variables in the url without
using the ? character.
When sending variables this is the normal way to do it:
/foo.php?id=12
But I have read that the following URL should work:
/foo.php/12/
and then fetch the id in this way:
$id = ereg_replace('[^0-9]', '', $PATH_INFO);
I have even seen it in function but the problem is that I can't get it to
work on my local apache server.
When I try to write /foo.php/12/ I get a '500 Internal Server Error' and in
the apache error-log I can read that 'Premature end of script headers:
c:/php/php.exe'. Does anyone know what could cause this error and why the
url isn't working??
thanks
Kenni Graversen