My organization has used spusa.org for 25 years, which I’ve always thought was silly because the Socialist Party USA has that acronym locked up in Google search results. So we’ve purchased several new domains, and I’ll be pointing them all at the same two sites (one Backdrop and one D8, at different subdomains per domain, i.e. www.spusa.org and community.spusa.org). All the dev is on spusa.org; are there any base URL gotchas I need to worry about?

It would also be nifty to respond differently to each domain; I might want to give each different home pages and themes. Where to for these?

 

Comments

indigoxela's picture

Hi jeffporten,

to make sure: your D8 and Backdrop are two different web spaces (VirtualHosts)?

And you have a bunch of new (sub)domains, you point at those. For example:

  • onedomain.org
  • otherdomain.org

point to your D8 web space, while

  • bar.onedomain.org
  • baz.otherdomain.org

point to your Backdrop web space. Is that correct? If that's the point, you don't have to worry, as that works out of the box for both.

The "nifty" part is a bit trickier (using different themes and/or layouts per (sub)domain).

For D8 there's the Domain Access module (currently alpha).

But that doesn't seem to be ported to Backdrop (yet).

In D7 there was a way to set, for instance, theme_default via settings.php based on $_SERVER['HTTP_HOST'] - I'm not sure but I don't think this is supported in Backdrop.

Other options:

  1. use a multisite setup (one code base, several databases / config directories)
  2. port domain module

... maybe someone else can provide cool ideas.

I use the domain access module for Drupal 7 and it does what you want, but that's D7 and/or D8.

I'm not sure how likely it is to be ported to Backdrop CMS, because I expect it would quite a bit of work. 

I don't think that multi-site is the right answer for you, since it uses a different database for each site. But, 

Related topics in forum:

If you only want a custom landing page for each theme, you could just create static html landing pages for each domain and point them at the same site. Or even create and theme custom landing pages in Backdrop CMS - then, point sub-domains directly at these specific pages.

But, if you want to share data but have a different theme, you want something like domain access.