We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16594
    • 8 Posts
    Hi

    Is it possible to have a modx site on 2 domains so that when you make changes to the content it updates them both?

    The two sites have the same structure and templates just different colours. So would the solution lie in 2 stylesheets or in creating 2 lots of templates in modx if it can be done at all that is?
      • 31227
      • 198 Posts
      Easily!
      Have one root folder ie (domain.com) and create an alias (domain.ru) that points to the same dir.
      Then install a plug in called (subsites I think) that redirects domain.ru to the index id of the page for that domain (you set the index ID, 404 ID and 403 Doc ID in the settings of the plug in).
      And voila!
      Different domains, different templates and etc etc etc.
      Have a look at the http://www.viriko.ru & http://www.viriko.com
      Both are in the same dir and use 1 modx smiley
      Its not perfect, but its close. Ive been running that site for nearly 2 years using this method.
        Pure MODx sites
        Viriko.ru & Viriko.com - Multilingual and running on 1 MODx
        • 16594
        • 8 Posts
        Thanks Vait.

        Will try it out.
          • 22840
          • 1,572 Posts
          Domain 1 would have modx installed and the database, domain 2 would have modx installed but edit the config file to point to the database on domain 1 (make sure you allow remote access to the database)

          As for the styles in the templates just link to a stylesheet relative to the domain and not with full urls, IE css/site.css, that way you can have your diffrent layouts ect.

          Not really something I would do as you will be penalized in goggle for duplicate content rolleyes
            • 16594
            • 8 Posts
            More useful advice, thanks paulp.

            I wouldn’t do it myself either but the client insists.
              • 31227
              • 198 Posts
              Quote from: paulp at Nov 25, 2008, 10:59 AM

              Domain 1 would have modx installed and the database, domain 2 would have modx installed but edit the config file to point to the database on domain 1 (make sure you allow remote access to the database)

              As for the styles in the templates just link to a stylesheet relative to the domain and not with full urls, IE css/site.css, that way you can have your diffrent layouts ect.

              Not really something I would do as you will be penalized in goggle for duplicate content rolleyes
              I dont think there is a point of having 2 installations when you can have 1 installation and do everything from there.
              Make mirrors of documents, and templates can be assigned in manager.
              i.e. http://www.viriko.ru/home-ru.html or http://www.viriko.com/home-en.html
              btw home-ru.html works on the dot com domain and home-en.html works on the .ru domain
                Pure MODx sites
                Viriko.ru & Viriko.com - Multilingual and running on 1 MODx