diff --git a/functions.php b/functions.php index 639ba3215..799ee6c0a 100644 --- a/functions.php +++ b/functions.php @@ -737,8 +737,7 @@ } function get_script_urlpath() { - $request_uri = $_SERVER["REQUEST_URI"]; - return preg_replace('/\/[^\/]+$/', "", $request_uri); + return preg_replace('/\/[^\/]*$/', "", $_SERVER["REQUEST_URI"]); } function get_login_redirect() {