LoginSignup
2
2

More than 5 years have passed since last update.

リダイレクトの注意点

Posted at

こんにちは。
見事にはまりました。

.htaccessに
リダイレクト設定をしようとして
以下の内容を記述

Redirect permanent /index.php http://doitourself.pupu.jp/diy_event/party.php

これは同一サーバ内で行っています。

リダイレクトループにはまりました。
index.phpはhttp://doitourself.pupu.jp/index.php

縦に並べてようやく理解。
http://doitourself.pupu.jp/
http://doitourself.pupu.jp/diy_event/party.php/

.htaccessは
http://doitourself.pupu.jp/ 直下に置いてあるため

サイトにアクセスする
→リダイレクトだ!
http://doitourself.pupu.jp/diy_event/party.phpへ!

http://doitourself.pupu.jp
/diy_event
/party.php/
と、上から順繰りおりてきて、

くる間に.htaccessが!

ということだったんですね。

RedirectMatchを使えば解決するらしいですが
ちょっと時間ないので、ひとまず原因がわかったのでメモです。

2
2
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
2
2