Wildcard forward all posts and pages with few exceptions
I want to move my domain from example.com to example.dev and also set a wildcard forward. I use WordPress for blogging, now I want all posts and pages to be moved to the new address but I want some pages to remain accessible with my previous address. For example:
example.com/post -> example.dev/post example.com/post2 -> example.dev/post2 [all posts be redirected] example.com/page1 -> example.dev/page1 example.com/page2 -> example.dev/page2 [all pages be redirected] Exceptions: example.com/pageN -> example.com/pageN (remain Same URL) example.dev/pageN -> example.com/pageN (redirected to previous domain) example.com/PageX -> accessible from both domains
I want both URLs to be used on a same WordPress installation, but some URLs (posts and pages) should be previewed on one domain and some on another and some on both, as explained.
If there’s a way to give posts and some pages URL of domain 2 and give the rest domain 1 it would be awesome. Like, instead of forwarding pages and posts, just rewriting their URL. For example, all posts now are on domain example.dev by default but also listed on example.com.
I don’t know how to explain this exactly.