![](https://blueproblog.com/wp-content/uploads/2021/05/6b5fb17a99744164d09161e53681f06f.png)
ロリポップに.htaccessファイルを使った転送設定のやり方をご紹介します
.htaccessで転送設定(301リダイレクト)
![](https://blueproblog.com/wp-content/uploads/2021/05/6b5fb17a99744164d09161e53681f06f.png)
![](https://blueproblog.com/wp-content/uploads/2021/05/6b5fb17a99744164d09161e53681f06f.png)
![](https://blueproblog.com/wp-content/uploads/2021/05/6b5fb17a99744164d09161e53681f06f.png)
その前に、.htaccessファイルがない場合は、作ることが出来ますので作り方はコチラの記事でまとめてあるので参考にしてくださいね
![](https://blueproblog.com/wp-content/uploads/2020/05/サーバー設定ロリポップHTアクセス作成-300x169.jpg)
![](https://blueproblog.com/wp-content/uploads/2020/05/サーバー設定ロリポップHTアクセス作成-300x169.jpg)
この転送設定(リダイレクト)の方法は幾つかあり、種類もいくつかあります
今回ご紹介するのは
301リダイレクトと言う方法です
まずはロリポップにログイン
左側のメニューからサーバーの管理・設定
の中にある独自ドメイン設定を開いてください
![](https://blueproblog.com/wp-content/uploads/2020/05/コメント-2020-05-10-134601fp.jpg)
![](https://blueproblog.com/wp-content/uploads/2020/05/コメント-2020-05-10-134601fp.jpg)
ロリポップに登録されているドメインの一覧が出るかと思います
設定したいドメインの公開(アップロード)フォルダを確認しましょう
![](https://blueproblog.com/wp-content/uploads/2020/05/コメント-2020-05-10-134601ffp.jpg)
![](https://blueproblog.com/wp-content/uploads/2020/05/コメント-2020-05-10-134601ffp.jpg)
ロリポップ FTP
ロリポップ FTPを開きましょう
先ほど確認した 設定したいドメインの公開フォルダを探し、クリックしてください
![](https://blueproblog.com/wp-content/uploads/2020/05/コメント-2020-05-10-165246p.jpg)
![](https://blueproblog.com/wp-content/uploads/2020/05/コメント-2020-05-10-165246p.jpg)
フォルダの横の+をクリックしてフォルダ内のファイルを表示させるか
![](https://blueproblog.com/wp-content/uploads/2020/05/コメント-2020-05-11-122925f.jpg)
![](https://blueproblog.com/wp-content/uploads/2020/05/コメント-2020-05-11-122925f.jpg)
フォルダを開きますと
.htaccessファイルが表示されると思います
![](https://blueproblog.com/wp-content/uploads/2020/05/コメント-2020-05-10-165246確認p.jpg)
![](https://blueproblog.com/wp-content/uploads/2020/05/コメント-2020-05-10-165246確認p.jpg)
.htaccessを開きましょう
![](https://blueproblog.com/wp-content/uploads/2020/05/コメント-2020-05-11-122925d.jpg)
![](https://blueproblog.com/wp-content/uploads/2020/05/コメント-2020-05-11-122925d.jpg)
人により下のHTMLを書く場所に、書いてある場合もあると思いますが
人それぞれの使用状況によると思います。
ここら辺は特に気にしないで大丈夫です
コードを貼る
一番下の所に
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://blueproblog.com//$1 [R=301,L]
を書き込みます
※緑線の所は自分のURLに変えてくださいね
![](https://blueproblog.com/wp-content/uploads/2020/05/コメント-2020-05-11-122925dj.jpg)
![](https://blueproblog.com/wp-content/uploads/2020/05/コメント-2020-05-11-122925dj.jpg)
書き終わったら
「保存する」をクリックして進みましょう
確認してみます
![](https://blueproblog.com/wp-content/uploads/2020/05/コメント-2020-05-11-122925djg.jpg)
![](https://blueproblog.com/wp-content/uploads/2020/05/コメント-2020-05-11-122925djg.jpg)
Enter ポチッ
![](https://blueproblog.com/wp-content/uploads/2020/05/コメント-2020-05-11-122925djgb.jpg)
![](https://blueproblog.com/wp-content/uploads/2020/05/コメント-2020-05-11-122925djgb.jpg)
![](https://blueproblog.com/wp-content/uploads/2021/05/6b5fb17a99744164d09161e53681f06f.png)
![](https://blueproblog.com/wp-content/uploads/2021/05/6b5fb17a99744164d09161e53681f06f.png)
![](https://blueproblog.com/wp-content/uploads/2021/05/6b5fb17a99744164d09161e53681f06f.png)
動画も作りました
![](https://blueproblog.com/wp-content/uploads/2021/05/6b5fb17a99744164d09161e53681f06f.png)
![](https://blueproblog.com/wp-content/uploads/2021/05/6b5fb17a99744164d09161e53681f06f.png)
![](https://blueproblog.com/wp-content/uploads/2021/05/6b5fb17a99744164d09161e53681f06f.png)
動画の方がお好みの方はコチラをどうぞ
コメント