#RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]
above and below part code not working together properly.I will close q to answer but you amy add comment thanks.
RewriteCond %{HTTPS} !=on [OR]
RewriteCond %{HTTP_HOST} ^name\.com$ [NC]
RewriteRule ^.*$
https://name.com%{REQUEST_URI} [R,L]