Narrowed down the problem
The main site is https, so to force https connections, the root htaccess has :
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
if I remove that, the htpasswd in the subdomain works correctly and Rewritebase works for subdomain pages
I have tried altering the https rule (in parent htaccess) so it only affects the parent domain:
so :
RewriteCond %{HTTP_HOST} (www\.){0,1}thedomain\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule (.*) https://www.thedomain.com/$1 [R,L]
(only force https on address starting www)
or:
RewriteCond %{HTTP_HOST} !^/subdomainname/thedomain.com
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
(force https if URL does not start with subdomainname)
but none work - I can't guess as to what is happening unless CPanel is doing something odd.
There are a few of the same issues found via Google .. but no solution.