For this I use the OneGateway plugin. This works if you set a domain alias on the domain.tld in Plesk.
But for a subdomain I cannot set an alias in Plesk. Nor can I set apache options so I have to create subdomains through Plesk. I thought to use a modified index.php to switch the context.
In the subdomain webroot I copy index.php, config.core.php and htaccess. I modify index.php as follows:
//insert on line 53<br /> define(’MODX_CORE_PATH’, ’/var/www/vhosts/domain.tld/httpdocs/core/’);<br /> // to override define(’MODX_CORE_PATH’, dirname(__FILE__) . ’/core/’); from config.core.php<br /> // line 89:<br /> $modx->initialize(’dev’);<br />
File structure on server:
/var/www/vhosts/domain.tld/httpdocs (modx revo pl install)<br />/var/www/vhosts/domain.tld/subdomains/dev/htpdocs (index.php) <br />
This more or less works, it displays the page but all styling is missing.
From the displayed page:
<base href="
http://dev.domain.tld/" />
<meta name="robots" content="noindex,nofollow" />
<link rel="stylesheet" type="text/css" href=
"/assets/templates/mytemplate/css/style.css" />
Obviously a path problem.
But how to solve this?
Greetings,
John