I imported all content from an old site to a new one.
The old site was basically a catalog of products and blog posts. However, it was all built as standard WP posts - not custom post types.
The new site has a blog and WooCommerce implemented, so I managed to divide all of the old posts into Post/Products, and old categories into Cats/Product cats.
However... The old permalinks were set to %category%/%post%, so you can't tell by the URL, whether it is a link for post, or for a product.
I need to set the redirects globally so the old links get redirected like this:
For products:
- FROM /some-category/some-product-name/
- TO /product/some-category/some-product-name/
For product categories:
- FROM /some-category/
- TO /product-category/some-category/
For blog posts:
- FROM /some-category/some-article/
- TO /blog/some-category/some-article/
For blog categories:
- FROM /some-category/
- TO /blog/some-category/
Or something similar, that would work in the same manner. I already tried some plugins like Redirection, but it's settings don't seem to match my needs. Is this even remotely possible?
add_rewrite_rule()
. But you'd need to know/find the exact post/product/category slugs.