• Dear all,

    I am setting up a wordpress site (hosted by hostgator in case it matters) and one of the requirements is to move (merge) existing blogger content to the new site.

    The situation is something like this:
    – existing blog is hosted at blogger, and is accessible through blog.myname.com subdomain
    – the new site will use mybiz.com domain
    – i want blog.myname.com to redirect to blog.mybiz.com where the new content is going to be

    I managed to get this concept working by installing multisite and creating a new blog.mybiz.com site and configuring this site to run on both, old and new subdomains. The problem with this setup is:
    – I need to maintain two sites, which is really not something I want to do
    – I’m not sure how easy it is to aggregate feeds from blog.mybiz.com to the main mybiz.com site

    One option is to create a category menu on mybiz.com site and have the old blogs at /blog/category/blog/ then redirect blog.myname.com to this URL. But the problem is, the browser URL is replaced with the new URL, which I don’t really like.
    I’ve tried a subdomain plugin (translating categories to subdomains) but it does not seem to work with multisite (due to that NOBLOGREDIRECT thingy).

    I know multisite is maybe not the best for this particular usecase, but I plan to host other, unrelated sites in the future, so I could really benefit from this setup.

    Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Wait… why is this Multisite?

    Thread Starter jernejk

    (@jernejk)

    Because I can’t figure subdomains with multisite (without setting up a subdomain as a new site).

    Thread Starter jernejk

    (@jernejk)

    It seems I can do a simple redirect from blog.myname.com to the new blog with sth like:

    RewriteCond %{HTTP_HOST} ^blog\.myname\.com$
    RewriteRule ^/?$ "http\:\/\/mybiz\.com\/blog\/category\/blog\/" [R=301,L]

    This needs to be before the multisite htaccess rules or it doesn’t work (for reasons I don’t uderstand).

    Is there a way to change this rule in a way that retains blog.myname.com URL in the browser?

    Don’t use the Redirection flag on your rewrite rule ??

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Read https://halfelf.org/2012/htaccess-anarchy/ for more on how to get .htaccess working like that on Multisite.

    And yes, always put your custom rules above WordPress. Because otherwise you call WP multisite times while redirecting.

    Thread Starter jernejk

    (@jernejk)

    @jesus even if I remove R=301 the browser is redirected.

    @ipstenu thanks for the link… I’m just not sure that is meant to retain browser URL as he’s using R=301 everyhere…

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    She. That’s my site.

    The concepts for how to handle redirect with multiple domains and subdomains is what you needed ?? You can fiddle with R as you need.

    Thread Starter jernejk

    (@jernejk)

    Ups, sorry ??

    I understand the concept here… if I use this (modified for my site):

    RewriteCond %{HTTP_HOST} ^blog\.ipstenu\.org [NC]
    RewriteRule ^(.*) https://ipstenu.org/$1 [L,R=301]

    it works. However, removing R=301 still results in redirect, but this time it’s 302. My guess is it has to do something with multisite.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Depends on where it’s redirecting to.

    domain.com or the signup page?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Multisite and category subdomains’ is closed to new replies.