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

    Following situation:
    I've got a site running under "www.domain.de" and the same under "www.domain.com".
    The whole content shall now be updated, so i installed modx for content-managing.
    The modx-installation runs under domain.de/modx/
    Because the site should be visible in german and english, i created two contexts ('web' for german and 'web2' for english language)
    Now i want to achieve, that when a user calls "domain.de/xy" the site under domain.de/modx/index.php?id=2" loads and the url that is visible for the visitor is still "domain.de/xy".
    The equivalent for the ".com-Domain" where the "modx-folder" should also be hidden and where the modx-cms automatically chosses the context for english language ("web2").

    Is that possible or have i to move the whole content to the root-directory first (where the old site is still running) ?

    I hope there is someone who can help me out...

    Thank you!!!
      • 31946
      • 116 Posts
      I have this situation solved with RewriteRules. In my webroot - .htaccess file i have those lines:
      RewriteEngine On
      RewriteRule ^manager$ /modx/manager/ [R=301,L]
      RewriteCond %{HTTP_HOST} ^yourdomain\.de$ [OR]
      RewriteCond %{HTTP_HOST} ^www\.yourdomain\.de$
      RewriteCond %{REQUEST_URI} !^/modx/
      RewriteRule (.*) /modx/$1


      You would have to check the HTTP_HOST variable also for yourdomain.com.

      Next modx needs to know which context (language) should be loaded. This can be done by a plugin.
      Check this out:
      http://rtfm.modx.com/display/revolution20/Using+One+Gateway+Plugin+to+Manage+Multiple+Domains

      I can recommend you the "Babel" Extra. It's great for managing multilingual sites and there are also some great tutorials out there:
      http://rtfm.modx.com/display/ADDON/Babel
      http://www.butter.com.hk/blog/posts/2010/08/internationalization-in-modx-revolution.html
      or (another, more SEO friendly solution):
      http://www.multilingual-modx.com/blog/2011/seo-friendly-multilingual-websites-with-modx-and-babel.html