We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36509
    • 127 Posts
    Hello,

    I hope you are having a great day.

    I just followed the tutorial found here:

    http://cmstricks.com/blog/2013/05/10/contextrouter-review

    But can't get it to work.

    I have my secondary domain parked so it points to my main directory where modx is installed..

    Primary Domain
    http://www.experiencewellspring.com/

    Secondary Domain

    http://www.HortonCountryHome.com

    Context: house

    Context Settings are as follows:

    Base URL - base_url - http://www.HortonCountryHome.com
    Error Page - error_page - 113
    HTTP Host - http_host - hortoncountryhome.com
    Site Name - site_name - House Site
    Site Start - site_start - 108
    Site URL - site_url - http://www.HortonCountryHome.com

    any ideas?


    Thanks!
      www.JBMWebDesign.com
      www.JBMAutomation.com
      • 3109 ☆ A M B ☆
      • 894 Posts
      If the experience domain is on the web context make sure you create the same context settings you did for the horton domain.

      Clear your cache and post back your results.

      Good luck.
        Benjamin Marte
        Interactive Media Developer
        Follow Me on Twitter | Visit my site | Learn MODX
        • 436 ☆ A M B ☆
        • 265 Posts
        Hi Jason,

        For the secondary context try the base_url as a forward slash like this:


        Also, try removing the captial letters from the domain names, that may cause a problem.
          MODX Ambassador for Thailand. Managing Director at Monogon, a web design and development studio based in Bangkok, Thailand. - Follow me on Twitter.
          • 25803 ☆ A M B ☆
          • 721 Posts
          What version of MODX are you running? I'm running 2.2.10-pl.
          I'm having the same issue. The primary context (web) still resolves but for the secondary I get the standard Apache "Default Website Page" page.

          At the moment we're using 2 staging domains, both are setup as parked domains.

          Context: web

          Host - http_host: nr.s.itristan.com
          Site Start - site_start: 1
          Site URL - site_url: http://nr.s.itristan.com/

          Context: take

          Base URL - base_url: /
          Host - http_host: ts.s.itristan.com
          Site Start - site_start: 48
          Site URL - site_url: http://ts.s.itristan.com/

          Also tried it without a Base URL at all for the second context, a Base URL for both contexts, with / as a value as well as the full URL of each context as a value.

          No luck yet. Did a DIG and confirmed the A record for both domains is pointing to the correct IP address.
            • 25803 ☆ A M B ☆
            • 721 Posts
            Checked the error log. We had duplicated an existing context (the sites will be virtually the same) and discovered that some resources were missing aliases, probably because the aliases in the original contexts took from the name of the resource and had some slashes (i.e. /) in them.

            We reset the aliases to proper aliases and when we visit the second context's URL we no longer get errors like this in the log:

            [2013-11-13 14:08:52] (ERROR @ /connectors/resource/index.php) Resource URI .html already exists for resource id = 64; skipping duplicate resource URI for resource id = 74


            However, we are getting this error:

            [2013-11-13 14:12:05] (ERROR @ /connectors/resource/index.php) [ContextRouter] You may have conflicting http_host definitions. Overwriting context web with web for host default
            


            In the System Settings for ContextRouter we have these:

            contextrouter.defaultContext: web
            contextrouter.includeWww: Yes (also tried No).

            Don't see where there is an http_host definition conflict.
              • 3109 ☆ A M B ☆
              • 894 Posts
              Guys you need to have the same Context Settings for both Contexts.

              @rx2 Context take has a base_url setting the web one doesn't make sure all context have the same context settings with their proper values.

              Make sure to clear your cache every time you make a Context Setting change in order for it to take effect.

              Let me know if that works.
                Benjamin Marte
                Interactive Media Developer
                Follow Me on Twitter | Visit my site | Learn MODX
                • 25803 ☆ A M B ☆
                • 721 Posts
                Afterward I changed the settings to ensure that I do have the same settings for both contexts. I always clear cache and even manually delete the cache files.

                It turns out, but of course, that the parked domain was missing a letter and all works perfectly well now.

                  • 3109 ☆ A M B ☆
                  • 894 Posts
                  @rx2 Awesome it's always the little details that mess us up wink

                  Glad you got it working.
                    Benjamin Marte
                    Interactive Media Developer
                    Follow Me on Twitter | Visit my site | Learn MODX
                    • 36509
                    • 127 Posts
                    thank you all for the replies, but I still can't seem to get it to work. the secondary domain just points back to the primary domain.

                    Web Context:

                    Base URL - base_url - /
                    Error Page - error_page - 51
                    HTTP Host - http_host - experiencewellspring.com
                    Site Start - site_start - 1
                    Site URL - site_url - http://www.experiencewellspring.com/

                    House Context

                    Base URL - base_url - /
                    Error Page - error_page - 113
                    HTTP Host - http_host - hortoncountryhome.com
                    Site Start - site_start - 108
                    Site URL - site_url - http://www.hortoncountryhome.com/

                    any ideas?

                      www.JBMWebDesign.com
                      www.JBMAutomation.com
                      • 36509
                      • 127 Posts
                      Using MODX Revolution 2.2.6-pl (traditional) bye the way
                        www.JBMWebDesign.com
                        www.JBMAutomation.com