1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

httpからhttpsへのredirect設定

Last updated at Posted at 2019-08-18

忘れちゃうので自分用メモ

Script

.htaccess の始めにこれを書いておけば大丈夫。
ネット上に諸説あったけれど、これが一番シンプルだったので採用。
=301 を忘れずに。

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]

チェック

Redirect Chackerでチェック。

###Result
CONGRATULATION. Everything seems to be fine.
http://www.ggcs.io
301 Moved Permanently
https://ggcs.io/
200 OK

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?