I need some guidance on how to redirect this the proper way...
I have a site on nginx
and a bunch of malformed URL's
(crawled by Search Console
) that I need to redirect with 301
.
My CMS
is Wordpress
and I need to redirect these URL's
to /post_url/
removing all sufixes after 1 segment (/post_url/
).
Malformed URL's
examples:
https://www.example.com/post_url/tag/tag-one
https://www.example.com/post_url/tag/tag-two
https://www.example.com/post_url/tag/tag-three
- etc.
I also need to preserve all tag's
URL
working like so => (https://www.example.com/tag/whatever
), and I have no clue on how to do it...