This question about Installation of Foswiki: Answered

How can I make two domains use the same data?

In my question on Adapt display size to small devices I already asked for this, but got a different solution, so I ask again with a different wording: In order to make a mobile version of my wiki, I'd like to get two different domains using the same data. I'm sure this should be somehow technically possible, but the question is how.

All the Webs and Topics would be identical, only the domain and the used layout would be different.
is equal to:

Maybe I need to set up an entirely new wiki (called greenwiki in my example), but at some place I'd have to mention in configure where the data is stored (in {DataDir}). I guess this may even be possible, so then is the question how I would make a difference in the layout settings of the WebPreferences, because these are stored in the "data" directory, which would be copied on both "wikis" (being the same source).

So my real question is how to generated a domain-dependant WebPreferences section, like writing:
   * #Set SKIN= %IF{'domain'='' then "red" else "green"}%

-- Lieven, admin of MOVED TO... - 05 Oct 2015

I suspect that you could do this using a single installation combined with some apache redirects. Essentially, you would configure the mobile domain to "mirror" the regular domain and add the mobile domain name to the {PermittedRedirectHostUrls} in configure. Then add some apache redirects to identify mobile devises and redirect them to the mobile domain. Here's some info on how to do that: Apache2: How To Redirect Users To Mobile Or Normal Web Site Based On Device Using mod_rewrite. Finally, you would set the skin variable as you described. I think this should work.

-- Main.LynnwoodBrown - 28 Oct 2015 - 17:12


QuestionForm edit

Subject Installation of Foswiki
Version Foswiki 1.1.9
Status Answered
Related Topics
Topic revision: r2 - 28 Oct 2015, LynnwoodBrown - This page was cached on 24 May 2019 - 02:36.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy