最近これでリダイレクトをかけましたよ。
でも最初動かなかった。
<html> <body> <?php header('Location: ./index.html');
原因は、これ
<html><!-- header()の前に文字列、改行はNG --> <body><!-- header()の前に文字列、改行はNG --> <?php header('Location: ./index.html');
header()
の前に文字列とか改行を書いちゃうとダメらしい。
なので、header()
を先に持って来ればおk
<?php header('Location: ./index.html'); ?> <html> <body>