10/10/2018, 00:24
lỗi index.php ai giúp với
mới tập làm web, đc. cái http://mistarg.summerhost.info, nhưng mỗi lần vào http://mistarg.summerhost.info nó ko tự động redirect tới http://mistarg.summerhost.info/index.php được. ai giúp với.
Bài liên quan
và chỉ có duy nhất 1 file index thôi.
---------------------------------------
mới test tài khoản khác, thì nó lại tự động chuyển tới news.php, chẳng hiểu thế nào. http://mistarg1.summerhost.info
thêm đoạn này vào trên cùng index.php
if (strpos($_SERVER***91;'REQUEST_URI'***93;, '/index.php') < 0) {
header('Location: /index.php');
exit();
}
if (false === strpos($_SERVER***91;'REQUEST_URI'***93;, '/index.php')) {
header('Location: /index.php');
exit();
}