fix rewrite map loading
[phorkie.git] / src / stub-phar.php
index ac82a382c1d8baa33220913ae357c86b6f240b22..9b65f2fabdf7c7c15a4f01b44f7e90bfd0d1d506 100644 (file)
@@ -55,10 +55,10 @@ function rewritePath($path)
 
 function rewriteWithHtaccess($path)
 {
 
 function rewriteWithHtaccess($path)
 {
-    //remove the trailing slash /
+    //remove the leading slash /
     $cpath = substr($path, 1);
     $bFoundMatch = false;
     $cpath = substr($path, 1);
     $bFoundMatch = false;
-    $map = include(__DIR__ . '/../src/gen-rewritemap.php');
+    $map = include('phar://' . __FILE__ . '/src/gen-rewritemap.php');
     foreach ($map as $pattern => $replace) {
         if (preg_match($pattern, $cpath, $matches)) {
             $bFoundMatch = true;
     foreach ($map as $pattern => $replace) {
         if (preg_match($pattern, $cpath, $matches)) {
             $bFoundMatch = true;