1

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?

Pang
  • 9,564
  • 146
  • 81
  • 122
Yoni
  • 316
  • 2
  • 13

3 Answers3

1

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>
Alex
  • 2,795
  • 3
  • 21
  • 21
  • 1
    Thanks, I will check it out and come back with the results – Yoni Nov 27 '16 at 15:38
  • This seems like the ideal solution, if not I am wondering if you could set up a multi site in word press with mapping to each blog like domain.com/blog and anotherdomain.co.uk/blog. Would be interesting to know if that is possible. – Andy Edwards Feb 10 '17 at 15:22
  • @AndyEdwards I would think but haven't tested. BTW, It seems that one could also use Azure's Application Gateway service as well (see https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-create-url-route-portal). I believe other solutions, such as Akaimai CDN and nginx webserver running as a reverse proxy, would work as well. – Alex Feb 10 '17 at 21:44
0

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?

Tim
  • 4,217
  • 1
  • 15
  • 21
  • Yes. As I am sick of copying the code over to each one every time. I think I might just leave the one has legit juice as /blog/ and I'll move the others over to subdomains. I'll figure out some kind of php code in my blog to forward anyone that comes in on the wrong domain to the one live one. – Yoni Nov 27 '16 at 15:37
0

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.

Community
  • 1
  • 1
Jason Elkin
  • 547
  • 3
  • 14