From 995dbef2a1d3fe61b05caa0889dd623c2741a014 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Mon, 5 Sep 2011 18:16:28 +0200 Subject: [PATCH] map clean urls to .php files in phar --- res/phar-stub.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/res/phar-stub.php b/res/phar-stub.php index 2c8f72c..9a4dfd4 100644 --- a/res/phar-stub.php +++ b/res/phar-stub.php @@ -25,6 +25,11 @@ function mapUrls($path) if (isset($arMap[$path])) { return $arMap[$path]; } + $pos = strrpos($path, '.'); + if ($pos === false || strlen($path) - $pos > 5) { + //clean url + $path .= '.php'; + } return '/www' . $path; }