サブドメイン毎にhttpsでリダイレクト
# not https start
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^domain\.jp$
RewriteRule ^(.*)$ https://domain.jp/$1 [R=301,L]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^sub\.domain\.jp$ [NC]
RewriteRule ^(.*)$ https://sub.domain.jp/$1 [R=301,L]
# not https end
特定のディレクトリのみリダイレクト
(開発段階では302リダイレクトにするのがみそ、
301にして間違っていたらブラウザキャッシュクリアするのが面倒)
RewriteEngine on
RewriteBase /
RewriteRule ^directory(.*)$ https://domain.jp/directory/ [R=302,L]