Thank you! It never crossed my mind to look there. I have updated the .htaccess files with the rules given but no, still I can't get it right. This is what I did:
Placed w3tc browser and page cache rules in /public_html/mydomain/.htaccess above these rules:
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]
The redirect was placed above everything else;
RewriteCond %{HTTP_HOST} !^mydomain.com$
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301]
The second set of page cache and minify rules were placed in their respective files. I must have missed something along the way, but what? You can probably tell I have enabled multisite. Don't know if that makes any difference.
Thanks for helping me out!