• I have a multiste with the main domain https://agrihomegh.com
    I have over a hundred posts published on the main site. I recently created a new subsite (https://blog.agrihomegh.com) to be solely for posts and migrated all the posts to that subdomain.

    Now I want redirect all the posts from the main domain to the corresponding posts on subdomain. I would like to also redirect categories and tags to their correspondents on the subsite.

    I would like to do all these in htaccess.

    Any help with necessary code snippets for htaccess?

    Very much appreciated.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    I’ve pondered over your question for a while… and if I understand you correctly, it seems:

    1) You want to redirect the blog posts you originally made at the root domain https://agrihomegh.com to the subdomain https://blog.agrihomegh.com

    2) But you also want to retain the main WordPress site running at the root domain https://agrihomegh.com (required for the entire multisite network to work), along with its pages and any custom post type content (currently existing or something you may create later down the road).

    I can’t think of any redirect or rewrite condition(s) that can be defined to distinguish between the two arbitrary requirements above.

    And it seems to me the only SAFE way to do this is to enumerate every single one of the existing URLs you want to redirect and setup up static redirect rules for EACH URL.

    See this page for a simple primer on writing redirect rules for individual files and folders: https://wpscholar.com/blog/simple-redirects-with-htaccess/

    Good luck!

    Thread Starter Coach Afrane

    (@coach-afrane)

    Thanks a lot, George.

    I don’t know what is wrong with my htaccess file (may be because I am not a wordpress expert), I have tried several suggestions but none seem to work.

    I think I will go for a plugin.

    Any suggestions?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘301 redirects’ is closed to new replies.