We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17883
    • 1,039 Posts
    Hey Chetan,

    the tutorial is for MODx Evo.
      • 11415
      • 1 Posts
      Newbie question - after I set this up should it work if I’m previewing pages in manager or only if I’m browsing to "real" urls?
      Thanks,
      Steve
        • 16310
        • 8 Posts
        I have made all from the tutorial for 2 domains But I have

        "ERROR: Too many forward attempts!
        The request could not be completed due to too many unsuccessful forward attempts." ,

        this appears when trying to open first url where modx installed


        when I open second url where modx not installed nothing happens. I thought it has to take info from folder in first url..

        Have I to put something in .htaccess of second domain or install something there?

          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: gruve at Oct 14, 2010, 04:33 PM

          Newbie question - after I set this up should it work if I’m previewing pages in manager or only if I’m browsing to "real" urls?
          If you configured your contexts properly, the preview will use the "real" URLs.
            • 19980 ☆ A M B ☆
            • 275 Posts
            hi

            i am trying to make import to site:

            example1.com

            and start like this example1.com/import.php

            but i have some other unstances set up and depending on some case in php file the new resource have to be created not only in example1.com
            but also in example2.com

            By some reason it doesn’t work. Does anybody know why new resources only come up in example1.com docs tree but no one in example2.com resources tree?

            I checked the `modx_site_content` and see that all lines are as ok. Any suggestions, please?
              modx and ecommerce pro
              • 23344
              • 31 Posts
              Adding the latter part of the .htaccess makes my elements and resources disappear (in Revo)

              # rewrite the homepage of each domain to index.html
              RewriteRule ^domain1-com\.html$ /index.html
              # do the other magic: Rewrite the the requests to for MODx readable folders
              RewriteCond %{HTTP_HOST} domain1\.com [NC]
              RewriteCond %{REQUEST_URI} !^/manager
              RewriteCond %{REQUEST_FILENAME} index\.php [OR]
              RewriteCond %{REQUEST_FILENAME} !-f
              RewriteCond %{REQUEST_FILENAME} !-d
              RewriteRule ^(index\.(html?|php)|domain1-com)?(.*)$ index.php?q=/domain1-com/$3 [L,QSA]


              Any idea why that is?

              Also, any new tips for making it work in Revo?
                • 1611
                • 591 Posts
                Pier2Design, You don’t need this in Revo. Use contexts.
                  • 16545
                  • 358 Posts
                  I’m trying to make multiple domains with multilingual content

                  Working URL has: http://www.domain1.tld/index.html?lang=ID
                  http://www.domain2.tld/index.html?lang=ID
                  ID - en, de, fr

                  Output URL must be like: http://domain1.tld/en/
                  http://domain1.tld/de/
                  http://domain1.tld/fr/
                  http://domain2.tld/en/
                  http://domain2.tld/de/
                  http://domain2.tld/fr/


                  So, the trick from YAMS rewrite doesn’t works here...
                  Any suggestions, plz?

                  RewriteCond %{HTTP_HOST} .
                  RewriteCond %{HTTP_HOST} ^domain1\.tld [NC]
                  RewriteCond %{HTTP_HOST} !^www\.domain1\.tld [NC]
                  RewriteRule (.*) http://www.domain1.tld/$1 [R=301,L]
                  RewriteRule ^domain1_tld\.html$ /index.html
                  RewriteCond %{HTTP_HOST} domain1\.tld [NC]
                  RewriteCond %{REQUEST_URI} !^/manager
                  RewriteCond %{REQUEST_FILENAME} index\.php [OR]
                  RewriteCond %{REQUEST_FILENAME} !-f
                  RewriteCond %{REQUEST_FILENAME} !-d
                  RewriteRule ^en/(.*)$ index.php?q=$1 [L,QSA]
                  RewriteCond %{REQUEST_FILENAME} !-f
                  RewriteCond %{REQUEST_FILENAME} !-d
                  RewriteRule ^de/(.*)$ index.php?q=$1 [L,QSA]
                  RewriteCond %{REQUEST_FILENAME} !-f
                  RewriteCond %{REQUEST_FILENAME} !-d
                  RewriteRule ^fr/(.*)$ index.php?q=$1 [L,QSA]
                  RewriteRule ^(index\.(html?|php)|domain1_tld)?(.*)$ index.php?q=/domain1_ltd/$3 [L,QSA]
                  
                  RewriteCond %{HTTP_HOST} .
                  RewriteCond %{HTTP_HOST} ^domain2\.tld [NC]
                  RewriteCond %{HTTP_HOST} !^www\.domain2\.tld [NC]
                  RewriteRule (.*) http://www.domain2.tld/$1 [R=301,L]
                  RewriteRule ^domain1_tld\.html$ /index.html
                  RewriteCond %{HTTP_HOST} domain2\.tld [NC]
                  RewriteCond %{REQUEST_URI} !^/manager
                  RewriteCond %{REQUEST_FILENAME} index\.php [OR]
                  RewriteCond %{REQUEST_FILENAME} !-f
                  RewriteCond %{REQUEST_FILENAME} !-d
                  RewriteRule ^en/(.*)$ index.php?q=$1 [L,QSA]
                  RewriteCond %{REQUEST_FILENAME} !-f
                  RewriteCond %{REQUEST_FILENAME} !-d
                  RewriteRule ^de/(.*)$ index.php?q=$1 [L,QSA]
                  RewriteCond %{REQUEST_FILENAME} !-f
                  RewriteCond %{REQUEST_FILENAME} !-d
                  RewriteRule ^fr/(.*)$ index.php?q=$1 [L,QSA]
                  RewriteRule ^(index\.(html?|php)|domain2_tld)?(.*)$ index.php?q=/domain2_tld/$3 [L,QSA]


                    • 1611
                    • 591 Posts
                    You need to somthing of this
                    RewriteRule ^(..)/(.*)$ index.php?q=$2&langid=$1 [L,QSA]

                    OR even

                    RewriteRule ^(..)/(index\.(html?|php)|domain1_tld)?(.*)$ index.php?q=/domain1_ltd/$4&langid=$1 [L,QSA]
                      • 24732 ☆ A M B ☆
                      • 300 Posts
                      Hi all.

                      I have a weird issue. my home page url works fine:

                      I go to http://www.mysite.com (doesn’t change to http://www.mysite.com/index.html)

                      so then I click on http://www.mysite.com/howitworks.html and again, it works. But when I click on http://www.mysite.com/newstuff.html from http://www.mysite.com/howitworks.html? then it puts in the folder name.

                      http://www.mysite.com/my-site/newstuff.html ....and the page shows but all of my image links and styles are broken.BUT if instead I click on http://www.mysite.com and THEN go to http://www.mysite.com/my-site/newstuff.html then everything works.

                      the site tree is set up thusly:

                      my-site
                      - howitworks
                      -newstuff
                      myqa-site
                      -howitworks
                      -newstuff

                      and my htaccess is like this:

                      
                      Options +FollowSymlinks
                      RewriteEngine On
                      
                      RewriteBase /
                      
                      # First be sure to rewrite the request to a unique domain
                      RewriteCond %{HTTP_HOST} .
                      RewriteCond %{HTTP_HOST} !^wwwqa\.mysite\.com [NC]
                      # rewrite the homepage of each domain to index.html
                      RewriteRule ^wwwqa-mysite-com\.html$ /index.html
                      
                      
                      # do the other magic: Rewrite the the requests to for MODx readable folders
                      RewriteCond %{HTTP_HOST} wwwqa\.mysite\.com [NC]
                      RewriteCond %{REQUEST_URI} !^/manager
                      RewriteCond %{REQUEST_FILENAME} index\.php [OR]
                      RewriteCond %{REQUEST_FILENAME} !-f
                      RewriteCond %{REQUEST_FILENAME} !-d
                      RewriteRule ^(index\.(html?|php)|wwwqa-mysite-com)?(.*)$ index.php?q=/wwwqa-mysite-com/$3 [L,QSA]
                      
                      
                      #RewriteCond %{SERVER_PORT}s ^(443(s)|[0-9]+s)$
                      #RewriteRule ^(.+)$ - [env=askapache:%2]
                      
                      # First be sure to rewrite the request to a unique domain
                      RewriteCond %{HTTP_HOST} .
                      RewriteCond %{HTTP_HOST} ^mysite\.com [NC]
                      RewriteCond %{HTTP_HOST} !^www\.mysite\.com [NC]
                      #RewriteRule (.*) http%{ENV:askapache}://www.mysite.com/$1 [R=301,L]
                      # rewrite the homepage of each domain to index.html
                      RewriteRule ^www-mysite-com\.html$ /index.html
                      
                      # do the other magic: Rewrite the the requests to for MODx readable folders
                      RewriteCond %{HTTP_HOST} mysite\.com [NC]
                      RewriteCond %{REQUEST_URI} !^/manager
                      RewriteCond %{REQUEST_FILENAME} index\.php [OR]
                      RewriteCond %{REQUEST_FILENAME} !-f
                      RewriteCond %{REQUEST_FILENAME} !-d
                      RewriteRule ^(index\.(html?|php)|www-mysite-com)?(.*)$ index.php?q=/www-mysite-com/$3 [L,QSA]
                      
                      


                      I will add that I did not set this up, this is a site I am taking over and and when I change the file and uncomment this:
                      #RewriteRule (.*) http%{ENV:askapache}://www.mysite.com/$1 [R=301,L]


                      or add

                      #RewriteRule (.*) http%{ENV:askapache}://wwwqa.mysite.com/$1 [R=301,L]
                      up top OR

                      if I add in their equivalents form the tutorial (the line in the tute is different) then it breaks. Which makes me suspect there is an apache rule elsewhere... the server is set up oddly.


                      the multisite plugin is exactly as it should be, same as the example. and I do have a 404 page and it works, I added that.


                      as a result of all of this, Wayfinder doesnt work. a lot of things do not work. The previous templates were all basically static html that some poor sot hard coded into the template, and they never used most of the functionality of modx ...so it didnt matter.

                      thank you in advance.
                        ________

                        Anne
                        Toad-in-Chief
                        Red Toad Media - Web Design, Louisville KY
                        Hear me tweet: http://www.twitter.com/redtoadmedia
                        "Bring on the imperialistic condiments." - Rory Gilmore