Ganti index.php menjadi index.html untuk menghindari redirect loop PHP
This commit is contained in:
@@ -571,12 +571,14 @@
|
||||
// Check auth
|
||||
if (!Auth.isAuthenticated()) {
|
||||
const currentPath = window.location.pathname.toLowerCase();
|
||||
const isLoginPage = currentPath.includes('index.php') ||
|
||||
const isLoginPage = currentPath.includes('index.html') ||
|
||||
currentPath.includes('index.php') ||
|
||||
currentPath === '/' ||
|
||||
currentPath === '/index.html' ||
|
||||
currentPath === '/index.php';
|
||||
// Hanya redirect jika belum di login page
|
||||
if (!isLoginPage) {
|
||||
window.location.href = '../index.php';
|
||||
window.location.href = '../index.html';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user