Multiple domains with one CMS?

General questions about CMSimple
Post Reply
svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

Multiple domains with one CMS?

Post by svasti » Tue Jun 10, 2014 10:28 pm

I have a client who wants an second website with its own domain name. However it would be cool for her, if she could access the same pictures as on the first domain -- and cool for me, to avoid installing and maintaining a second XH.
Maybe it is possible with something like .2lang?

|
domain 1______index.php (+ something like .2lang, .2domain ?)
|
domain 2______index.php
|_cmsimple
|_content
| |_content.htm
| |_2domain
| . |_content.htm
|_plugins
|_templates
|_userfiles

domain 1 & 2 would share the same language and email, only the site name would differ.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Multiple domains with one CMS?

Post by cmb » Tue Jun 10, 2014 11:20 pm

svasti wrote:I have a client who wants an second website with its own domain name. However it would be cool for her, if she could access the same pictures as on the first domain -- and cool for me, to avoid installing and maintaining a second XH.
Maybe it is possible with something like .2lang?
Subsites---here we go again. :)

Indeed, sometimes there is the need for having something like subsites. However, things are not always as they seem; it might well be possible to do without any "subsite" solution or workaround---and sometimes even better so (consider the search functionality, for instance).

In this case you may consider setting up single installation, where <h1> denotes the "sites" and all former <h1>s become <h2>s etc. Then you'd have to fix up the template (toc(2)) and maybe the sitemap (have not verified that, but not being able to pass the starting menulevel to sitemap() might be regarded as a bug). The final step would be to map (301!) the domains to the appropriate URLs.

The latter seems to be an ugly workaround, but mapping the domains to the appropriate folders using a subsite solution (or 2lang), might not work anyway.
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

Re: Multiple domains with one CMS?

Post by svasti » Wed Jun 11, 2014 9:29 am

cmb wrote:Subsites---here we go again.
:lol:
svasti wrote:However it would be cool for her, if she could access the same pictures as on the first domain
I just tested it and it can be done:

domain1_______index.php
|_cmsimple____$cf['folders']['userfiles']="domain2/userfiles/";
|_content
|_plugins
|_templates
|_domain2______index.php
. |_cmsimple____$cf['folders']['userfiles']="/userfiles/";
. |_content
. |_plugins
. |_templates
. |_userfiles

So I think that's the way I'll do it.

Post Reply