]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: Update README that gitweb works better with PATH_INFO
[Gitweb] / gitweb.perl
index 409346b57881981f58be4be67c2a931ec6bfdbb976aa4e1897b9818ad64fad23..10f679d2e1bdcab2d405a0a2bf5715b337ed85c8f3d5aabb026bf97bf929c9b1 100755 (executable)
@@ -2902,9 +2902,14 @@ sub git_header_html {
 <meta name="robots" content="index, nofollow"/>
 <title>$title</title>
 EOF
-# print out each stylesheet that exist
+       # the stylesheet, favicon etc urls won't work correctly with path_info
+       # unless we set the appropriate base URL
+       if ($ENV{'PATH_INFO'}) {
+               print '<base href="'.esc_url($my_url).'" />\n';
+       }
+       # print out each stylesheet that exist, providing backwards capability
+       # for those people who defined $stylesheet in a config file
        if (defined $stylesheet) {
-#provides backwards capability for those people who define style sheet in a config file
                print '<link rel="stylesheet" type="text/css" href="'.$stylesheet.'"/>'."\n";
        } else {
                foreach my $stylesheet (@stylesheets) {
This page took 0.195049 seconds and 4 git commands to generate.