Maybe I’m being dumb, as I’m new to WP Multi-site and the domain mapping plugin, but I can’t get it past this hurdle.

I have the main site and a sub-site (as a sub directory) set up, and a second domain mapped to the sub-site – all OK so far:

http://www.othersite.com -> http://www.mainsite.com/subsite

If I go to http://www.othersite.com, it displays the subsite home page fine. But all the links on that page refer to, for example, http://www.mainsite.com/subsite/?page_id=2 rather than http://www.othersite.com/?page_id=2, and so any click effectively takes you back to the main site subfolder.

I know that sunrise.php is being called, and I checked the contents of $_SERVER[ ‘HTTP_HOST’ ] – it does contain http://www.othersite.com when viewing the mapped domain. I’ve also tried fiddling with the permalinks, but that didn’t seem to help.

This is my .htaccess file – its all been generated by WP, not by me.

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

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ – [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

Any clues as to how to get the links on the subsite pages to refer to the mapped domain?