Commit 79bb1a9c authored by S. Zeid's avatar S. Zeid

fix the current request's query string being displayed in example URLs on index page

parent 00f39c70
......@@ -117,6 +117,7 @@ function main($request_uri = null, $url_prefix = "", $_get = null, $https = true
$root = "http".(($https) ? "s" : "")."://{$_SERVER["HTTP_HOST"]}"
.((!empty($url_prefix)) ? "/".trim($url_prefix, "/") : "")
."/".ltrim($request_uri, "/");
$root = preg_replace("/\?.*$/", "", $root);
echo str_replace("___ROOT___", rtrim($root, "/"), file_get_contents("index.html"));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment