Not compatible with custom REST-API prefix

[ad_1]

I was creating a custom REST-API prefix and noticed that this plugin has hardcoded references to /wp-json/. If I change my prefix from “wp-json” to “api” or something else, your functionality will not work as expected. Here is the process to change REST-API prefix.

Here’s where you can find the references to in your code to “wp-json” for Redirection (Version: 5.3.10)

  • canonical.php:177
  • redirection-admin.php:732
  • redirection.js:2

Could you update your PHP code to grab the REST-API URL using this function: get_rest_url()? I’m unsure how to solve the JS reference unless you use PHP to write to the JS file.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer