Hello,
I apologize for the inconvenience you are facing with the 404 errors on old URLs after changing the category slug structure. It seems that the WPML fix you added is unrelated to the lack of redirections causing the issue.
To resolve this problem and ensure that visitors can access your content seamlessly, you need to set up proper redirections for the old URLs with the product-category slug to the new URLs without the slug.
You can achieve this by using the Rank Math redirection module. Here’s a detailed guide on creating redirections and solving 404 errors using Rank Math.
If you encounter any difficulties while setting up the redirections or have any further questions, please feel free to reach out to our support team directly from here. We are available 24/7 and more than happy to assist you.
Thank you for bringing this concern to our attention. We are here to help you resolve this issue promptly.
Sources:
What Is a Slug in WordPress? » Rank Math
How to Optimize a Category Page » Rank Math
Multilingual SEO with Rank Math SEO & WPML » Rank Math
How to Remove the Category Base From WordPress » Rank Math
How to Find Out Where 404 Errors Are Coming From » Rank Math
Isn’t it handled automatically in normal circumstances?
Hello,
Thank you for contacting us and sorry for any inconvenience that this issue might have caused.
In this instance, the default WordPress redirect for deleted pages will not apply here. You will have to create redirection rules to target the old URLs and redirect them to the new URLs.
You can use regex redirection type to target URLs of the same structure at once: https://rankmath.com/kb/how-to-use-regex-redirects/
Hope that helps, and please do not hesitate to let us know if you need our 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.