Remove dependence on SCRIPT_URI and SCRIPT_URL $_SERVER vars that don't exist in some versions of Apache