The Wise Man Said:
<WISE MAN's EMAIL>
Subject:
RE: [PHP3] URL without a classic php filename like php, php3,
phtml?
Date:
Tue, 11 Apr 2000 12:54:35 MST
From:
[EMAIL PROTECTED]
To:
"Michael Simcich" <[EMAIL PROTECTED]>,
[EMAIL PROTECTED]
Addressed to: "Michael Simcich" <[EMAIL PROTECTED]>
[EMAIL PROTECTED]
** Reply to note from "Michael Simcich" <[EMAIL PROTECTED]> Tue,
11 Apr 2000 11:23:16 -0700
> Is there any way to pass parameters with php without using the
> classic http://www.whatever.com/somepage.php?param=3 type format? So
> that the url would look more like
In httpd.conf, in the <VirtualHost> block for the site:
<Location /ThisIsAProgram>
ForceType appllication/x-http-php
</Location>
In a php program file, named ThisIsAProgram in the DocumentRoot of the
site:
==========================
<?
$Params = explode( '/', $PATH_INFO );
while( list( $Index, $Value ) = each( $Params )) {
echo "Params[ $Index ] = $Value<BR>\n" );
}
?>
==========================
Hit this URL:
http://whatever.site.com/ThisIsAProgram/these/directories/are/not/real
You should get:
Params[ 0 ] =
Params[ 1 ] = these
Params[ 2 ] = directories
Params[ 3 ] = are
Params[ 4 ] = not
Params[ 5 ] = real
If you can't or don't want to do the <Location> thing, you can name the
file ThisIsAProgram.php (or .php3) and call it:
http://whatever.site.com/ThisIsAProgram.php/these/directories/are/not/re
al
But I think it is pretty cool to make the program name look like just
another directory in the tree, so I usually use <Location>.
Rick Widmer
Internet Marketing Specialists
www.developersdesk.com
</WISE MAN's EMAIL>
-Stathis.
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.
>
> I just tried it, but all I got was an internal server error :(.
>
> Anyone who knows *anything* about this?
>
> Take care,
> /franklin
>
> --
> Franklin van Velthuizen [EMAIL PROTECTED] +46-(0)19-10 99 17
> Ebiris AB www.ebiris.se +46-(0)19-10 99 10
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]