Can I use WP’s built in domain mapping with WP installed on a sub-domain?

In order to fix your problem, assuming you are using Apache web server, paste this into your .htaccess (the .htaccess inside the sub-domain (my) directory):

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ wp/$1 [L]
RewriteRule . index.php [L]

Once you have completed that, go to your DNS settings and set up a wildcard DNS entry for your domain. This basically says to Apache:

“If someone comes to this (sub,) sub-domain, this is the IP for it.

xxx.xxx.xxx.xxx A *.my.example.com

That should work fine. as it did for me.


EDIT: The OP has edited his question. This answer may or may not be a solution for the problem above, although this will fix majority of problems with wildcard sub-domain, WordPress Multisite installations.