X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/3a4a992415ebe43ac6af00d6eea6443034058bfe7b2fc82b00d60e94979a58e9..a341a1048ae5adee5899af18efc76cb217f080043b5b3b221100063da3b4eec7:/gitweb.perl diff --git a/gitweb.perl b/gitweb.perl index 5ac2233..87c50e6 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -27,6 +27,13 @@ our $version = "++GIT_VERSION++"; our $my_url = $cgi->url(); our $my_uri = $cgi->url(-absolute => 1); +# if we're called with PATH_INFO, we have to strip that +# from the URL to find our real URL +if (my $path_info = $ENV{"PATH_INFO"}) { + $my_url =~ s,\Q$path_info\E$,,; + $my_uri =~ s,\Q$path_info\E$,,; +} + # core git executable to use # this can just be "git" if your webserver has a sensible PATH our $GIT = "++GIT_BINDIR++/git";