1
votes

I am in the process of moving my 4 (almost identical) Umbraco sites into 1 Umbraco instance using Umbraco's multisite concept.

Everything is going well, but I have one issue.

Each of my sites have a /blog/ WordPress blog. Obviously, they each have their own unique content.

I cannot figure how to keep my site to use the same directory structure (its obviously important for Google Juice reasons).

Can anyone suggest a solution that will allow me to retain the directory structure with the WordPress blog?

3

3 Answers

1
votes

One solution would be to use the URL rewrite and Application Request Routing (ARR) IIS modules. In this scenario, each WordPress install could be a separate application (perhaps hosted on another server) and the ARR module would be configured as a reverse proxy with rewrite rules for each domain with the blog app Rewrite URL. Each blog would have a rule something like this (needs tweaking/testing):

<rule name="Blog1" stopProcessing="true">
  <conditions>
    <add input="{HTTP_HOST}" pattern="^www\.domain1\.com$" />
  </conditions> 
  <match url="^blog?(.*)" />  
  <action type="Rewrite" url="/blog1{R:0}" />  
</rule>
0
votes

That's going to be VERY difficult with a multisite site, as there can only be ONE "/blog/" folder shared across ALL of the sites in the instance.

If this is a requirement, your options are to have a unique blog folder for each site (e.g. /blog-1, /blog-2 etc), or have each site as a separate Umbraco site. Bear in mind that if you have different blog folders, they'll all be available in EVERY site, which might not be what you want.

If you were feeling brave, you might be able to do something clever with IIS Rewrite to rewrite requests to different underlying virtual folders, depending on the domain, but you'd still have the problem of all the underlying blog folders being available in every version of the site.

If it were me, I'd have all the sites as separate Umbraco instances in this particular case, as it would save a lot of headaches. Is there a particular reason why they have to be in one Umbraco instance?

0
votes

It sounds like what you really need is a better deployment process.

These days it's a relatively common scenario to develop on a single codebase that is then pushed to multiple sites/servers/locations and there's a lot of tooling around to help you do that.

Octopus Deploy, Kudu or Visual Studio Team Services will all take your code and deploy it to multiple sites (mentioned because they're free, but there are loads of CI tools for .NET that will do this).

Of course you could also automate Web Deploy with or without MSBuild yourself.