0
votes

I have a site that needs to be translated into three foreign languages. I created a new context through System -> Contexts, then created context settings for the base_url, site_url, and http_host. When I go to the home page in the new context, however, it routes to the File Not Found Resource from the initial context. Any ideas what I might be missing/doing wrong?

thanks

EDIT: Here are the uncommented lines in my .htaccess file

RewriteEngine On
RewriteBase /

RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

(a lot of rewrite rules from an older version of the site that used .aspx files. None of them match with the URLs on the website)

# Add 'www' to the HTTP_HOST for all domains except seasidehotelshawaii.com
# this will also preserve the query string.
RewriteCond %{HTTP_HOST} !^(.*)[this_is_the_main_domain].com$
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

I don't know a lot about .htaccess files, but this is what is in there. this_is_the_main_domain.com is the parent of three child sites. I am trying to create three contexts for each of the child sites.

2
what have you done to your .htaccess? - Sean Kimball
@SeanKimball please see my edit - symlink
Did you edit your index file? - tsg

2 Answers

0
votes

You have to make some pretty extensive changes to your htaccess file. I'm guessing you didn't write a context sweitching plugin either?

Follow these tutorials:

http://www.multilingual-modx.com/blog/2011/multilingual-websites-with-modx-and-babel.html

http://www.multilingual-modx.com/blog/2011/seo-friendly-multilingual-websites-with-modx-and-babel.html

Basically, you have not given modx a method of changing context or given it a way to generate your urls correctly.

0
votes

Try using the XRouting or ContextRouter plugins to route your domains to the proper context.