Viewing 3 replies - 1 through 3 (of 3 total)
  • IMHO the REST API setting in the WordPress Tweaks module sufficiently secures the REST API.

    Just sharing my thoughts.

    @tazotodua, you can use rewrite method

    add_action(‘init’, ‘rewrite_url’);
    function rewrite_url(){
    add_rewrite_rule(‘^(.*)?’,’index.php?rest_route=/$matches[1]’, ‘top’);
    flush_rewrite_rules();
    }

    Append above code in functions.php
    This will remove wp-json or hide wp-json from url while calling rest api

    after got the results comment below line.
    flush_rewrite_rules();

    Thread Starter tazotodua

    (@tazotodua)

    @krishnathamisetty thanks, but that’s not point of the topic – if i were to place codes, I know them. Just wanted to be option in iThemes..

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Add HIDE WP-JSON API url too’ is closed to new replies.