Hello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
It seems like you have a redirection on your website that adds a trailing slash to all URLs and that is being triggered in the API routes as well.

That should not be applied to REST API routes but only to the pages and posts of the website. Otherwise, the functionality of the plugin might not work as intended.
To fix this, adding the condition line RewriteCond %{REQUEST_URI} !^/wp-json (exclude wp-json URLs) to your trailing slash redirect rule should work, The edited redirect will look similar to the one below:
#Add Trailing slash for end of the URL
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/wp-json
RewriteRule ^(.*[^/])$ /$1/ [L,R]
Here’s how you can edit .htaccess file using Rank Math:
https://rankmath.com/kb/edit-htaccess/
Please do take a backup before editing your .htaccess file.
You can also ask your hosting provider to do that for you.
Let us know how it goes. Looking forward to helping you.
Thank you.
Hey,
Thanks for that – I updated our .htaccess with your amended code – but nothing has changed, it still can’t save and the same error is showing – even with PHP being restarted.
Kind regards
Hello,
I can see that the Rank Math REST API still redirecting to the trailing slash URL.

If the .htaccess rule is not working, we can suggest you to consult with your hosting provider and make sure that the redirection not implemented for the REST API calls.
Let us know how it goes.
Thank you.
Hey – apparently this is due to how Litespeed processes .htaccess rules.
Are you able to help us adjust the rules to be Litespeed friendly?
https://gridpane.com/kb/how-to-create-server-level-redirects-on-openlitespeed-ols/
Kind regards, and thank you for everything so far.
Jamie
Hello,
We recommend getting in touch with their team as they are in a better position for modifying the redirects on a server level.
Here are the Rank Math REST API endpoints for your reference:
https://rankmath.com/kb/whitelist-rank-math-in-cloudflare/#rest-api
Let us know how this goes.
Thank you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.