HTTPリダイレクト
の編集
https://yassu.jp/pukiwiki/index.php?HTTP%A5%EA%A5%C0%A5%A4%A5%EC%A5%AF%A5%C8
[
トップ
] [
編集
|
差分
|
バックアップ
|
添付
|
リロード
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
-- 雛形とするページ --
(no template pages)
HTTPリダイレクトにはいくつか種類があります。 **301 Moved Permanently [#td091286] Permanently(永久に)移動する時使います~ SEO的には転送『先』のURLをインデックスして欲しい時 ***PHPでの書き方 [#e1aa19a5] header('Location: http://example.com/', TRUE, 301); ***.htaccessでの書き方 [#c6025913] Redirect permanent / http://example.com/ ***metaタグでの書き方 [#p4daf980] <meta http-equiv="Refresh" content="0; URL=http://example.com/"> **302 Found(Moved Temporary) [#le37e990] Temporary(一時的に)移動する時使います~ SEO的には転送『元』のURLをインデックスして欲しい時 ***PHPでの書き方 [#g1097b03] header('Location: http://example.com/'); header('Location: http://example.com/', TRUE, 302); ***.htaccessでの書き方 [#we77fb93] Redirect temp / http://example.com/ ***metaタグでの書き方 [#occ3a5ce] Yahoo!は0以外であれば302扱いだが、Googleはダメらしい <meta http-equiv="Refresh" content="1; URL=http://example.com/"> metaタグでの記述は携帯電話では認識しない問題などがあるのでオススメしません。
タイムスタンプを変更しない
HTTPリダイレクトにはいくつか種類があります。 **301 Moved Permanently [#td091286] Permanently(永久に)移動する時使います~ SEO的には転送『先』のURLをインデックスして欲しい時 ***PHPでの書き方 [#e1aa19a5] header('Location: http://example.com/', TRUE, 301); ***.htaccessでの書き方 [#c6025913] Redirect permanent / http://example.com/ ***metaタグでの書き方 [#p4daf980] <meta http-equiv="Refresh" content="0; URL=http://example.com/"> **302 Found(Moved Temporary) [#le37e990] Temporary(一時的に)移動する時使います~ SEO的には転送『元』のURLをインデックスして欲しい時 ***PHPでの書き方 [#g1097b03] header('Location: http://example.com/'); header('Location: http://example.com/', TRUE, 302); ***.htaccessでの書き方 [#we77fb93] Redirect temp / http://example.com/ ***metaタグでの書き方 [#occ3a5ce] Yahoo!は0以外であれば302扱いだが、Googleはダメらしい <meta http-equiv="Refresh" content="1; URL=http://example.com/"> metaタグでの記述は携帯電話では認識しない問題などがあるのでオススメしません。
テキスト整形のルールを表示する