Incorrect PATH_INFO when FastCGI is serving "/"
When mod_fastcgi is serving "/" i.e. configured as following
fastcgi.server = ( "/" => ( ... ) )
it produces wrong SCRIPT_NAME and PATH_INFO.
For example, request for /test/url is represented as
SCRIPT_NAME = "/test" PATH_INFO = "/url"
while it has to be
SCRIPT_NAME = "" PATH_INFO = "/test/url"
Interesting that mod_scgi doesn't have that issue.
Updated by Anonymous about 15 years ago
I've been hit by the same problem when trying to use Moin as the root URI.
There is no straightforward solution to this, as there is no generic pattern for splitting the URI in SCRIPT_NAME and PATH_INFO. In some cases you want the whole URI in PATH_INFO, in some other cases you want SCRIPT_NAME to be set, and you could imagine thousands of other cases.
I'd like this to be fixed by a URI => PATH_INFO mapping, with a new configuration variable. The result could look like this:
fastcgi.path_info = (
"^/(admin|stats)/(.*)" => ("/$1", "/$2"),
"^(.*)$" => ("", "$1"),
This way /admin/foo would lead to SCRIPT_NAME="/admin" and PATH_INFO="/foo", while /bar would lead to SCRIPT_NAME="" and PATH_INFO="/bar".
Also available in: Atom