I have been searching for a solution to this but can't find a good answer. I am trying to achieve the following through Wordpress with the Yoast SEO plugin.

Here is what I am trying to do: I need to redirect certain directories and their pages to a subdomain.

Example: www.example.com/directory1/lots-of-pages-here to subdomain.example.com/directory1/lots-of-pages-here

Here is the potential curveball. I don't want to migrate everything from www. to subdomain. I still want to keep specific pages on www.example.com so I can't wildcard everything.

I got to believe there is an easy approach here but I'm just not finding it. Thank you for your help.

  • Are there pages within that subdirectory that need to stay? If so you will need a list of the pages to redirect, can you produce that? – Stephen Ostermiller Jun 1 '18 at 1:10
  • 1
    www.example.com is a WP setup. How about subdomain.example.com/directory1/. Its a separate WP or its same WP? If it is separate then it shouldn't be hard I guess. – TopQnA Jun 1 '18 at 4:53
  • 1
    Is /directory1 a physical directory or a URL-path within WordPress? – DocRoot Jun 1 '18 at 8:02
  • There are too many questions to answer this properly. Please address these points by editing your question. – Stephen Ostermiller Jun 1 '18 at 8:31