Ok it's definitely the rewrite rule causing the problem but I only have a rudimentary understanding of Apache's 'RewriteCond' and 'RewriteRule' so I was hoping someone could point me in the right direction.
This site is using the Babel extra and has some custom rewrites in the .htaccess file.
i.e.
# redirect all requests to /ch/favicon.ico to /favicon.ico
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(en|ch)/favicon.ico$ favicon.ico [L,QSA]
# redirect all requests to /ch/assets* to /assets*
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(en|ch)/assets(.*)$ assets$2 [L,QSA]
# redirect all other requests to /ch/* to index.php and set the cultureKey parameter
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(en|ch)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA]
It is using the context switching method described at
http://www.multilingual-modx.com/blog/2011/seo-friendly-multilingual-websites-with-modx-and-babel.html with a gateway plugin that sets the 'cultureKey'
This all works great for this single-page site that just uses ajax to load additional resources.. but if I create a new resource that is requested with it's own friendly uri it spits out the 503 error.
I know that it is the above rewrites causing the problem because I commented them out and tried the stock rewrite that is supplied by MODx
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
and I can then access the new resources correctly. But of course it breaks the context switching and I'm stuck with only the default language.
How can I fix this without breaking the multi-lingual functionality?