You need to be putting the following
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST}//s%{HTTPS} ^subdomain\.(.*)//((s)on|s.*)$ [NC]
RewriteRule ^ http%3://%1%{REQUEST_URI} [L,R=301]
It will redirect you from the subdomain.newdomain.com to newdomain.com. You could refer to SEO FAQ's also