旧社名でのアクセスを振り向けなおしたり、http を https に向けなおす
rewrite rule をメモ。
<IfModule mod_rewrite.c>
RewriteEngine on
# www.oldcompany.com is deprecated
RewriteCond %{HTTP_HOST} !^www\.newcompany\.com [NC]
RewriteCond %{HTTP_HOST} !^$ [NC]
# redirect http access to https
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://www.newcompany.com/$1 [L,R]
</IfModule>
