RM redirects to old category

#948612
  • Another issue popped up. So I had a parent category called Apple that just never worked. I decided to change its slug and create a new category called Apple. Changed all the menus, swapped out categories for products and moved sub-categories. So, on paper it all looks correct now. The issue is, the main category redirects to the OLD one (which had the slug changed). It redirects from the new “Apple” category to the old one called “Apple-old”. When RM is off, the redirection does not happen and all works well. I even deleted the “Apple-old” as well as cleared all possible cache. What to do?

Viewing 11 replies - 16 through 26 (of 26 total)
  • Hegert T
    Rank Math free

    Hi,
    extended it.

    Hello,

    We checked and the issue is not occurring any more, even though we made no changes to the RankMath’s plugin files.

    Could it be possible you made some changes that fixed this?

    Thank you.

    Hegert T
    Rank Math free

    Hi, I’ve checked it now also and seems to be working. I did not make any changes that I’m aware of, other than creating new sub-categories for a different category, maybe that affected it?

    Hegert T
    Rank Math free

    By the way, I just updated Elementor and Site Kit By Google, now the Apple category is broken again.

    Hegert T
    Rank Math free

    Are you still checking it?

    Hello,

    We deeply apologize for the unexpected delay in response.

    We tried to check your website but the temporary login URL you’ve shared is expired and getting redirected to your homepage.

    Please renew and extend it to at least 3 days so we can check the issue further.

    Looking forward to helping you.

    Thank you.

    Hegert T
    Rank Math free

    It has taken a whole lot of time with no updates or actions. Seems like an impossible issue.

    Extended it.

    Hegert T
    Rank Math free

    Hello, seems like there are no updates.

    Hello,

    Sorry for not following up quickly and any inconvenience that might have been caused due to that. We logged into your site and spent a considerable amount of time debugging the issue, but unfortunately, we were unable to find a solution.

    Even with other plugin (Premmerce Permalink Manager) that offers similar functionality, the apple category returns a 404 error. We also tried to add a custom rewrite rule in your theme’s functions.php file:

    
    add_action('init', function() {
    	add_rewrite_rule('^apple/?$', 'index.php?product_cat=apple', 'top');
    } );
    

    Additionally, we tried adding the following RewriteRule to your .htaccess file:

    
    RewriteEngine On
    RewriteBase /
    
    RewriteRule ^apple/?$ /index.php?product_cat=apple [L,R=301]
    

    But none of these worked. Given that both .htaccess rules and the add_rewrite_rule function are standard WordPress methods, they should work regardless of our plugin.

    At this point, we recommend reaching out to your hosting provider to check if there are any server-level restrictions or conflicts preventing this rewrite rule from working for the apple link. They might be able to provide further insights.

    I hope that helps.

    Hegert T
    Rank Math free

    I don’t know. Through the ways I have tested it seems to be related to the RM plugin. There must be a reason why changing the permalink to absolutely anything other than “apple” it starts working, BUT it also worked the way it is right now before it just stopped.

    Hello,

    Unfortunately, we were also not able to find the exact reason why the specific /apple category was not working. As mentioned earlier, this issue is not limited to the Rank Math plugin, as other methods did not work either.

    However, we checked your category page again and we can see it is getting redirected to /apple-tooted/ which is working properly.

    Can you please confirm if you managed to resolve the issue on your website?

    We are looking forward to helping you.

    Thank you.

Viewing 11 replies - 16 through 26 (of 26 total)

You must be logged in to reply to this ticket.