fix svc_url to work no matter where we are coming from in the tree - use rooturl...
[freeside.git] / FS / FS / CGI.pm
index 88548cd..a85d48a 100644 (file)
@@ -239,14 +239,17 @@ sub rooturl {
   #even though this is kludgy
   $url_string =~
     s{
-       (browse|config|docs|edit|graph|misc|search|view|pref)
+       /
+       (browse|config|docs|edit|graph|misc|search|view|pref|rt)
        /
        (process/)?
-       ([\w\-\.]+)
+       ([\w\-\.\/]+)
        $
      }
      {}x;
 
+  $url_string .= '/' unless $url_string =~ /\/$/;
+
   $url_string;
 
 }