Deprecated: Assigning the return value of new by reference is deprecated in /home/users/2/floppy.jp-999953/web/kagakusukimono/class/View.php on line 25

Deprecated: Assigning the return value of new by reference is deprecated in /home/users/2/floppy.jp-999953/web/kagakusukimono/class/View.php on line 30

Warning: Cannot modify header information - headers already sent by (output started at /home/users/2/floppy.jp-999953/web/kagakusukimono/class/View.php:25) in /home/users/2/floppy.jp-999953/web/kagakusukimono/class/View.php on line 81
科学好き者の日々::お気に入りに登録されたURL

お気に入りに登録されたURL

ホームページの閲覧をして、「お気に入り」に登録しているのに、いつの間にか行けなくなったということを聞きました。
URLを直接入れれば行けるとのことです。

ふーん、なぜかなぁ?

見てみると、
http://XXXXXX/index.html
が登録されています。
トップページはindex.htmlではなくてindex.phpとしています。従って、上記だとNOTFOUNDのエラーになってしまいます。
直接URLは
http://XXXXXX/
とindex.phpを省略して伝えてありますので、phpが開くのですね。

お気に入りで最初は開けたようなので、どこかでindex.htmlが入ってしまったのでしょうか?

対策として、index.htmlを作っておいてindex.phpに自動転送させる方法もありますが、今のサーバーはhtmlのほうがphpよりも優先するようなので、http://XXXXXX/としている今正常な人は、開くまでに今より時間がかかってしまいます。

試してみたらそれほど時間はかからないようなので、以下を書いたindex.htmlを作りました。
<html>
<head>
<meta http-epuiv=”Refresh” content="0;url=http://XXXXXXX/index.php">
</head>
<body>
</body>
</html>

念のため.htaccessファイルに
DirectoryIndex index.php index.html
としてphpを優先するようにもしてみました。

とりあえずはOKのようです。


Calendar
<< May 2024 >>
SunMonTueWedThuFriSat
   1234
567891011
12131415161718
19202122232425
262728293031
search this site.
tags
archives
recent comment
recent trackback
others
admin