R: How to pass params in URL without ? or &?

From: Date: Thu, 30 Nov 2000 10:46:19 +0000
Subject: R: How to pass params in URL without ? or &?
Groups: php.general 
Request: Send a blank email to php-general+get-28012@lists.php.net to get a copy of this message
Maybe "Apache URL Rewriting Guide" is for you. Ciao Roberto > -----Messaggio originale----- > Da: Ken [mailto:kenzo@free-music.com] > Inviato: mercoledì 29 novembre 2000 21.56 > A: php-general@lists.php.net > Oggetto: How to pass params in URL without ? or &? > > > Surely SOMEBODY has dealt with this issue before. To > reiterate, I want to have a URL like: > > http://mysite.com/script.php3/p/value/p2/value2/ > > and have it call my script "script.php3" and pass it > parameters p and p2, with values value and value2. > > I know how to parse "/p/value/p2/value2/" within my script to > achieve that result, but I can't figure out how to configure > my Apache or PHP3 to even call "script.php3" when given a URL > like the above. > > I'm stuck. The only thing I can think of is that it might > not be doable when running PHP as a CGI instead of running > PHP as an Apache module. > > Can anyone solve this one? > > Thanks greatly. Original message is below. > > - Ken > kenzo (at) free-music.com > > >Date: Tue, 28 Nov 2000 06:01:05 -0500 > >To: php-general@lists.php.net > >From: Ken <kenzo@free-music.com> > >Subject: [PHP] Using http://mysite.com/script.php3/p/value > to pass value, PHP CGI > > > >I'm trying to make PHP scripts that have > search-engine-friendly URL's (like > http://mysite.com/script.php3/p/value). I'll be passing > parameters around in the URL's, but I don't want to use & and > ?, since this will prevent search engines from indexing the site. > > > >I'm using PHP 3.0.16 (currently under Win32, so it's a CGI, > not an Apache module) and Apache 1.3.12. > > > >I've encountered various help documents that talk about how > to parse the /p/value part of the URI. I found one document > that instructed me to use ForceType in my Apache conf to get > all calls to folder "script" to call a PHP file called > "script" in my docroot, and then have it parse the /p/value. > > > >I have had no luck in getting PHP/Apache to even get as far > as opening my script. I haven't yet tried to deal with > parsing issues, as this is still moot. > > > >In access.conf, I have: > ><Location /local> > >ForceType application/x-httpd-php3 > ></Location> > > > >In my web root, I have a file called "local". > > > >Trying to access the URL http://localhost/local yields: > > > >Fatal error: Unable to open d:\mydocroot\local\ in - on line 0 > > > >as returned from my PHP process. So, PHP is being called, > but it's not winding up opening the file I want it to open. > > > >If I rename my file to "local.php3", just as an experiment, > and I still use the same URL as above, the error message changes to: > > > >Fatal error: Unable to open d:\mydocroot\local.php3\ in - on line 0 > > > >Can this even be done when running PHP as a CGI? > > > >As a side question, can PHP3 be run as an Apache module? I > haven't found the binaries for this anywhere. > > > >Thanks greatly for any help. I have combed many resources > trying to get an answer to this question. > > > >- Ken > >kenzo(at)free-music.com > >

« previous php.general (#28012) next »