Multiple problems with RankMath

#619632
  • Resolved Anonymous
    Rank Math free

    Hello,
    A few days ago I added this code to my .htaccess file
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*[^/])$ /$1/ [L,R=301]

    To redirect URL without ending slash to ones with ending slash.

    After that I found 4 problems with RankMath.

    First, my site’s XML sitemap is completely blank. https://nikolaroza.com/post-sitemap.xml/

    Second, I write my own schema so I always remove the default article schema RM generates. The problem is that as soon as I update the page, RM regenerates that article schema.

    Third, in the RM dashboard, I can’t turn off or on any of the RankMath features. The toggle button just keeps turning but it never finishes.

    Fourth, I also can’t change meta title of any blog post. I change and update my page and the old title remains.

    Can you please tell me what’s wrong?
    Once I remove the code I added to my .htaccess RankMath works perfectly.

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.

    Please try to follow the steps below and see if that helps you to resolve the sitemap issue:

    1. Flush the Sitemap cache by following this video screencast:
    https://i.rankmath.com/pipRDp

    2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
    https://rankmath.com/kb/exclude-sitemaps-from-caching/

    3. If the above steps don’t seem to work, kindly apply the following filter to your site.

    add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
    

    Here’s how you can add filter/hook to your WordPress site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Regarding the rest of the issues, the trailing slash rule you’ve set is being applied in the Rank Math Rest API routes. 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]
    

    Let us know how it goes. Looking forward to helping you.

    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.

Viewing 1 replies (of 1 total)

The ticket ‘Multiple problems with RankMath’ is closed to new replies.