Without a link, I can't get into too much detail, but I can confirm the following:
Your server (Apache I presume) isn't set up properly with subdomains. Subdomains should be defined in the Apache config file, for example:
<VirtualHost *:80>
DocumentRoot /var/www/domain/subdomain
ServerName subdomain.domain.com
</VirtualHost>
If you do the above, then the subdomain is a website in it's own right. It doesn't really know or care that it's a subdomain of the primary domain or not. It's path is always subdomain.domain.com.
It seems your server is setup with a htaccess *WILDCARD* rewrite setup, that just checks ***.domain.com, and tries to map it to domain.com/***/ (if *** exists). This is not really a subdomain at all, just an URL rewrite. It seems you simply have a REDIRECT in a .htaccess file at some level, which REWRITES /subdomain/ to subdomain.domain.com.
X3 needs to calculate the relative PATH of the X3 app, and it does this with
$_SERVER variables. Your server variables are returning values from the true path domain.com/subdomain/ instead of the subdomain.
Does that mean ALL your subdomains mydomain.domain.com are ALSO available from domain.com/mydomain/? Bad practice.
If you check your URL/?diagnostics, you will see PATHS (at the bottom of page) which confirm this. I am wondering what hosting service would not have a proper subdomain setup?