From 64b2a4e09d53d93fb503ef9ac7918867693386d7 Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Thu, 9 Apr 2015 21:59:17 +0200 Subject: [PATCH] Allow empty localRoot --- proxy.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxy.php b/proxy.php index 157a15e..b16cf02 100755 --- a/proxy.php +++ b/proxy.php @@ -31,7 +31,9 @@ class Proxy { // Target determination $metd = $_SERVER['REQUEST_METHOD']; $reqp = $_SERVER['REQUEST_URI']; - $reqp = str_replace_once($localRoot, '', $reqp); // TODO Reliable method + if ($localRoot != '') { + $reqp = str_replace_once($localRoot, '', $reqp); // TODO Reliable method + } // Preparing request headers $reqHeds = "$metd $root$reqp HTTP/1.1\r\n";