Support » Plugin: WP REST API (WP API) » URL rewrite from /wp-json.php to /api

Viewing 4 replies - 1 through 4 (of 4 total)
  • Try no slash after wp-json.php.

    rewrite ^/api/(.*) /wp-json.php$1 break;

    Plugin Author Ryan McCue

    (@rmccue)

    At the moment, you have to edit the main file yourself. I’ve filed an issue for this. Thanks!

    Hi Ryan,

    I’m trying to do the same myself.

    When you said edit the main file, which file /files do you mean ?

    I’ve tried updating :
    add_rewrite_rule( ‘^wp-json/?$’,’index.php?json_route=/’,’top’ );
    add_rewrite_rule( ‘^wp-json(.*)?’,’index.php?json_route=$matches[1]’,’top’ );

    But it didn’t work, it still expects wp-json.

    Thanks,

    Lisa

    I am very, very new to WP.org. I have some experience with WP.com
    My self-hosted website is at http://www.ifcullen.com and I am trying to sync up my Windows Live Writer with my website. It’s so much easier to format my posts with images, etc. It’s asking for the “API url” and I haven’t a clue where to find that?
    Please help. will post this in a better category next.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘URL rewrite from /wp-json.php to /api’ is closed to new replies.