regex expression

#625589
  • Resolved Darie Nani
    Rank Math free

    Hi,

    Can you help me with creating a regex expression which will remove category slugs.
    So from domain[.]com/category/posttitle to domain[.]com/posttitle?

    TIA

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting us and bringing your concern to our attention.

    If you want to redirect from your /category/post-title/ to /post-title/ then you can add the following regex redirection on your website.

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

    Make sure to replace the category and yourdomain.com with the actual category name and your domain name.

    However, please note that if you’ve multiple categories, then you’ll have to create multiple redirections for each category.

    Hope that helps and please don’t hesitate to let us know if you have any other questions.
     
    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 ‘regex expression’ is closed to new replies.