You have a page on url http://localhost/test.shtml that includes (with #exec cgi) /script.cgi and you call this with http://localhost/test.shtml/extra/path?param=1 you get the following:
Unfortunately (on Apache), there seems to be no environment variable that shows only the URI of the called shtml page (should be /test.shtml here) if the request contains extra path_info.REQUEST_URI = /test.shtml/extra/path?param=1 PATH_INFO = /extra/path QUERY_STRING = param=1 SCRIPT_NAME = /script.cgi DOCUMENT_URI = /test.shtml/extra/path
Your best bet would probably be to remove $ENV{PATHINFO} from $ENV{DOCUMENT_URI}.
Please note that SSI support and implementation varies betweeen different (versions of) webservers, so you probably should test all this yourself by including a test script in a shtml page like this:
Also note that using CGI.pm may change the value of certain environment variables. YMMV.#!/usr/bin/perl print "Content-type: text/plain\n\n"; for (sort keys %ENV) { print "$_ : $ENV{$_}\n"; }
-- Joost downtime n. The period during which a system is error-free and immune from user input.
In reply to Re: #exec and $ENV{'PATH_INFO'}
by Joost
in thread #exec and $ENV{'PATH_INFO'}
by Ionizor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |