We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43732
    • 9 Posts
    Hi, I was reading this and I'm having some problems. Sorry for my really bad english, I speak spanish.
    Ok, please help me in this:
    1. I have the following domain: www.miempresa.com
    2. I created my webpage in normal version and it's working perfectly.
    3. I've duplicated y 'web' context and i've renamed the new to 'movil'; this is because now im going to have two versions of my web, a movil version and a normal version, the problem is when i do right click in the home, about, products or some other resource of 'movil' context it's showing me PAGE NOT FOUND.

    Please i'm new in modx and i need your help pleaseee !.
    I have to configure htacces?, or something, im not sure what i have to do, please help me.
    Thank you, God bless you.

    PS. I've attached a image to explain this, not ignore it. [ed. note: adanyc last edited this post 10 years, 11 months ago.]
    • You will need to configure the context (click its name in the tree and open the Context Settings tab) and add at least the following:

      - site_url: the full url to the site, like http://mobile.site.com/
      - http_host: the domain: mobile.site.com
      - base_url: the part after the domain: /
      - site_start: the ID of the resource that is the homepage in the context. This is 21 in your case judging from your screenshot.

      When you did that, MODX knows most of what it needs. You could also add error_page with the resource ID for an error page.

      You will also need a way to have the server start up the right context when a request comes in. What I typically do is make sure that the second/sub domain (mobile.site.com) is configured to resolve to the same folder on the server as the main domain (site.com), and then I install the ContextRouter plugin in MODX. This plugin will look at the http_host you just configured and should work without additional configuration.

      Another option is to have the subdomain resolve to a different folder and to copy the index.php, config.core.php and .htaccess files into that directory. Then you would open the index.php, find "$modx->initialize('web');" in the file and change "web" to the name of your context. Third option could be the Gateway Manager plugin.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
      • @adanyc Check out my ContextRouter Review/Tutorial so you can get this working properly.

        Good Luck.
          Benjamin Marte
          Interactive Media Developer
          Follow Me on Twitter | Visit my site | Learn MODX
          • 43732
          • 9 Posts
          Thank you friends Mark Hamstra and benmarte , I made it work! [ed. note: adanyc last edited this post 10 years, 11 months ago.]
            • 43732
            • 9 Posts
            Hi, i came back here, because now i have problems with path images where i have to change that?
              • 43732
              • 9 Posts
              Hi friends, please I need you help.
              I followed the ottogal steps in this post http://forums.modx.com/thread/?thread=75284&page=1
              Now i have my site working but i have problems with path of my images.
              In my 'web' context all its ok, but in my 'movil' version the path to my images have a doble www.misitio.com/movil/movil/image.png and i cant see the image, please help in wich part of my 'movil' context i have to change the path of files for this context.
              thank you.
              • Make sure your template has the base tag:

                <base href="[[++site_url]]" />
                


                Also make sure to create a base_url context setting for your movil context and set the proper path for it that should take care of your issues.

                Make sure to check out the Context section on the RTFM so you can get a better understanding how these work.
                  Benjamin Marte
                  Interactive Media Developer
                  Follow Me on Twitter | Visit my site | Learn MODX
                  • 43732
                  • 9 Posts
                  Friends, please you are excellent people.
                  I need some help here http://forums.modx.com/thread/84738/please-i-m-dying-with-a-formsave-problem please help me !