strip script name from self URL
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 24 May 2006 13:32:07 +0000 (13:32 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 24 May 2006 13:32:07 +0000 (13:32 +0000)
git-svn-id: file:///home/dpavlin/private/svn/webpac/trunk@733 13eb9ef6-21d5-0310-b721-a9d68796d827

WebPac.pm

index e28dbbc..f59c73b 100644 (file)
--- a/WebPac.pm
+++ b/WebPac.pm
@@ -63,6 +63,10 @@ sub suff2file($$$$) {
 
        return $tpl if (! $base_path);
 
+       #warn "base_path: $base_path, p: $p, path: $path, tpl: $tpl\n";
+
+       $p =~ s#/[^/]*$##;
+
        # strip everything to and including base path, leaving only
        # additional (virtual) path
        if ($base_path eq "/") {