"Search Engine friendly" URLs (/ instead of ? or &) not working in CGI mode
| From: | Jobarr | Date: | Thu, 13 Sep 2001 06:31:02 +0000 |
| Subject: | "Search Engine friendly" URLs (/ instead of ? or &) not working in CGI mode | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-67147@lists.php.net to get a copy of this message | ||
Hello, I am running windows 2000, apache 1.3.20, and php 4.0.6. I am trying
to set it up so that I could access my webpage as
http://www.site.com/script/1/2 as opposed to
http://www.site.com/script.php?var1=1&var2=2.
I am using a method similar to
the one descriped here:
http://www.evolt.org/article/Search_Engine_Friendly_URLs_with_PHP_and_Apache
/17/15049/index.html.
For some reason, if I use PHP as a CGI and access any script with a "/"
after it (http://www.site.com/script.php/) it causes a 500 error and this
message in the error log: "Premature end of script headers: c:/php/php.exe".
If I access the same URL using PHP as an apache module, I have no problems.
But, there seems to be some memory leaks in the module so I want to to use
the CGI instead.
Does anyone know why it won't work in CGI mode or maybe what I am doing
wrong?
This is my config for the CGI mode:
ScriptAlias /php/ "C:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
Thanks!
-Jobarr