From: Christian Weiske Date: Fri, 4 Jul 2014 08:12:24 +0000 (+0200) Subject: fix rewrite map loading X-Git-Tag: v0.4.0~21 X-Git-Url: https://git.cweiske.de/phorkie.git/commitdiff_plain/47a3b51ef8ab7d47bc5492c830bc8905e3fb872e fix rewrite map loading --- diff --git a/src/stub-phar.php b/src/stub-phar.php index ac82a38..9b65f2f 100644 --- a/src/stub-phar.php +++ b/src/stub-phar.php @@ -55,10 +55,10 @@ function rewritePath($path) function rewriteWithHtaccess($path) { - //remove the trailing slash / + //remove the leading slash / $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;