Hi all,
I’m trying to assign a separate domain to a secondary context. Using dummy details for illustration, my context settings are:
base_url = /newsite/
http_host = newsite.com
site_start = 12345
site_url = https://www.newsite.com/newsite/
To remove /newsite/ from the visible URL, I added the following to .htaccess:
RewriteRule ^newsite/(.*)$ /$1? [R=301,L,QSD]
This gives me clean URLs, but the homepage then resolves to:
https://www.newsite.com/index/?cultureKey=newsite&q=index/
which makes me think MODX is falling back to its internal routing because the context still expects base_url = /newsite/.
If I remove /newsite/ from base_url and site_url entirely, the request falls back to the default web context and homepage.
Has anyone successfully configured a secondary context to run from its own domain without requiring the context prefix in the URL? Is there a recommended way to handle domain-based context routing in this scenario?
Any pointers would be much appreciated. (Am using MODx 2.8.6)