http→https wwwなし→wwwありへのhtaccessへのリダイレクトへの書き方

  • このエントリーをはてなブックマークに追加

sslへ転送

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

wwwありに転送

RewriteEngine On
RewriteCond %{HTTP_HOST} ^xxxx.co.jp$
RewriteRule ^(.*)$ https://www.xxxxx.co.jp/$1 [R=301,L]

  • このエントリーをはてなブックマークに追加

SNSでもご購読できます。

コメントを残す

*