Using http://mysite.com/script.php3/p/value to pass value, PHP CGI
| From: | Ken | Date: | Tue, 28 Nov 2000 11:01:05 +0000 |
| Subject: | Using http://mysite.com/script.php3/p/value to pass value, PHP CGI | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-27573@lists.php.net to get a copy of this message | ||
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