gitweb: make static files accessible with PATH_INFO
[gitweb.git] / gitweb / gitweb.perl
index f4defb01d9bd4c27b486838fdb5189064fc601c3..87948fc422ff9445ae7bb9a951fcc655fc054462 100755 (executable)
@@ -2901,6 +2901,11 @@ sub git_header_html {
 <meta name="robots" content="index, nofollow"/>
 <title>$title</title>
 EOF
+# 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
        if (defined $stylesheet) {
 #provides backwards capability for those people who define style sheet in a config file