Hello,
Thank you for contacting Rank Math support and we apologize for the inconvenience.
It sounds like there might be a compatibility issue with another plugin or your theme. This can happen sometimes when different plugins use the same code or resources. But don’t worry, we can help you figure out what’s causing the problem and how to fix it. It’s not difficult and it won’t affect your site visitors.
Here’s what you need to do:
If the problem persists, please let us know and we’ll be happy to take a closer look.
We appreciate your patience and cooperation. We hope to resolve this issue as soon as possible.
If that was the case, the clone site wouldn’t work? Look at what I wrote in the sensitive data because that’s whats thrown me.
Hello,
Upon checking your site, it seems that the Rank Math routes for saving are getting a trailing slash at the end:
https://www.yourdomain.com/wp-json/rankmath/v1/updateMetaBulk/
In your .htaccess
, you have a rule to force it with this code:
# Force trailing slash
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_URI} /+[^\.]+$
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]
</IfModule>
In this case, please exclude the routes by modifying the .htaccess file. We haven’t added the code yet as your site is live to avoid any unexpected issues/downtime.
The exclusion rule could be something like this:
RewriteCond %{REQUEST_URI} !^/(wp-json/.*)$
You can also reach out to your web host regarding this since this is a sensitive file.
Please add the exclusion and after clearing the website and browser’s cache, see if the issue is fixed.
Let us know how this goes.
Thank you.
Hi
Thanks for the reply. I’ve added this but its made no difference. I’ve put your exclusion on line 146 in the htaccess file. Are you able to check?
Hello,
We checked your website and we can see that the Rank Math Rest API still getting redirected to the trailing slash. Please check the screenshot in the sensitive data section for your reference.
It looks like you’re using Nginx web server. In this case, htaccess rule may not work properly. We recommend you to get in touch with your hosting provider to remove the trailing slash from Rank Math Rest API.
Let us know how it goes. Looking forward to helping you.
Thank you.
WEll this is annoying as they said to speak to you guys :/
Hello again,
I’m afraid, this is not something we can solve from our end. You’ll need to reach out to your host again and ask them to add a rule to your Nginx configuration file, nginx.conf
.
The code will usually look something like this:
location ~ /(wp-json/.*)$ {
# do nothing
}
location / {
if ($request_uri ~ "/+[^\.]+$"){
rewrite ^/(.+[^/])$ /$request_uri/ redirect;
}
}
Hope that helps and please do not hesitate to let us know if you need my assistance with anything else.
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.