liuhairui 1 deň pred
rodič
commit
22944634d8
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 2 1
      public/index.php

+ 2 - 1
public/index.php

@@ -22,7 +22,8 @@ if (is_file($__pef)) {
         if ($__adm !== '' && is_file(__DIR__ . '/' . $__adm)) {
             $__pi = isset($_SERVER['PATH_INFO']) ? trim((string)$_SERVER['PATH_INFO'], '/') : '';
             $__s = isset($_GET['s']) ? trim((string)$_GET['s'], '/') : '';
-            if ($__pi === '' && $__s === '' && (!isset($_GET['to']) || (string)$_GET['to'] !== 'frontend')) {
+            // 带任意 GET(如 addtabs、sort、offset)多为 index 模块 Ajax,不可 302 到后台,否则表格等请求失败
+            if ($__pi === '' && $__s === '' && empty($_GET)) {
                 $__dir = str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME'] ?? '/'));
                 if ($__dir === '/' || $__dir === '\\' || $__dir === '.') {
                     $__dir = '';