You can also use the panels .htaccess file with these lines:
Code:
RewriteEngine on
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://sub.domain.com/$1 [R,L]