• Resolved redcastor

    (@redcastor)


    Hello,

    The build_request_uri not store correct request uri if wp installed on domain subfolder.

    Example https://domain.com/wp/wp-json/…. => /wp/wp-json/….
    But we want store only without wp home url like this /wp-json/….

    Class Endpoint_Api, Function build_request_uri replace line 79
    $request_uri = filter_input( INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL );

    by

    $home_url = get_home_url(null, '', 'relative');
    $request_uri  = str_replace($home_url, '', filter_input( INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL ));
    • This topic was modified 5 years, 8 months ago by redcastor.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘build_request_uri not store correct request uri’ is closed to new replies.