Hello,
I apologize for the issue you are facing with the redirection. It sounds like you’re trying to set up a regex redirection from your old custom post type slugs to the new category slugs, which is a great way to maintain your links.
Based on your regex source URL and destination:
- Regex Source URL:
/articles-how-to/(.*)
- Destination URL:
/how-to/$1
This setup should work if your URLs are structured correctly. However, if it’s not functioning as expected, here are a few suggestions:
-
Check the Regex Match Type: Ensure that you have selected the Regex option in the Match Type dropdown when setting up the redirection.
-
Verify the Source URL: Make sure that the source URL matches exactly what you have in your website’s URLs. For example, if your URLs are structured differently or if there are any typos, the regex won’t match.
-
Test with a Simple Redirect: As a troubleshooting step, try creating a simple redirect without regex to see if that works. For example, redirect from /articles-how-to/sample-post
to /how-to/sample-post
directly.
-
Use the Redirection Debugger: If you haven’t already, use the Redirection Debugger tool in Rank Math to diagnose any issues with your redirects. This can help identify if there are conflicting redirects or other problems.
-
Check for Conflicting Redirects: Sometimes, existing redirects can conflict with new ones. Check your existing redirects to ensure there are no overlaps that could be causing issues.
If you continue to experience difficulties, please reply to this ticket with your site URL so we can assist you further. A human agent from our support team will be able to take over and provide more tailored assistance.
Thank you for raising this concern, and we’re here to help you resolve it!
Sources:
How to Redirect Posts After Changing URLs » Rank Math
Solving Redirection Issues Using Rank Math SEO Plugin » Rank Math
I think the Regex is working. I hadn’t made any changes but was testing it, and it wasn’t working. Once I made the changes to the post type and category, the regex seems to work. There were some auto-redirects made as well.
Hello,
It seems that you already marked this ticket as “Resolved”.
Do you still need our assistance regarding this issue?
Looking forward to helping you.
Thank you.