category based redirection

#584176
  • Resolved Anonymous
    Rank Math free

    Dear Support,

    I have rcenetly updatred my parmalink structure to go to
    link.com/cateogry/postname from link.com/postname

    however this is resulting in error from search engine pages. Can you share the correct redirection setup in rank math to redirect all link.com/postsname to link.com/cateogey/postname as setup in permalinks?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

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

    If you changed your permalink structure from link.com/category/postname to link.com/postname then you’ll have to create the redirection from /category/postname to /postname. For this, you can add a regex redirection on your website like the following one:

    Source: ^category/(.*)
    Redirection Type: regex
    Destination URL: https://www.yourdomain.com/$1
    

    Please replace the category and yourdomain with the actual category name and your actual domain name.

    However, please note that if you’ve multiple categories then you’ll have to create separate redirection for each of your categories.

    Hope that helps and please don’t hesitate to let us know if you have any other questions.
     
    Thank you.

    Anonymous
    Rank Math free

    Hey,

    But i have many many categories. Is there’s a universal way to define category? So URL is post directed to category it is from?

    Hello,

    Unfortunately, Rank Math’s regex redirection feature could not analyze if the word is a category or from your other URL slug.

    In this case, you may need to create a regex for each of your categories.

    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 3 replies - 1 through 3 (of 3 total)

The ticket ‘category based redirection’ is closed to new replies.