diff --git a/.gitignore b/.gitignore index c14fa910..99dbdb61 100644 --- a/.gitignore +++ b/.gitignore @@ -51,4 +51,5 @@ system/devices/** docker-compose.yml docs/** !docs/*.html -!docs/*.md \ No newline at end of file +!docs/*.md +.htaccess \ No newline at end of file diff --git a/.htaccess_firewall b/.htaccess_firewall index 5d37c58f..e0a5bd5f 100644 --- a/.htaccess_firewall +++ b/.htaccess_firewall @@ -11,4 +11,12 @@ Order Allow,Deny Allow from all - \ No newline at end of file + + +RewriteEngine On +RewriteBase / +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f +RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d +RewriteRule ^(.*)$ index.php [QSA,L] \ No newline at end of file diff --git a/system/boot.php b/system/boot.php index 45f1781e..67101234 100644 --- a/system/boot.php +++ b/system/boot.php @@ -43,7 +43,7 @@ $ui->setConfigDir(File::pathFixer($UI_PATH . '/conf/')); $ui->setCacheDir(File::pathFixer($UI_PATH . '/cache/')); $ui->assign('app_url', APP_URL); $ui->assign('_domain', str_replace('www.', '', parse_url(APP_URL, PHP_URL_HOST))); -$ui->assign('_url', APP_URL . '/index.php?_route='); +$ui->assign('_url', APP_URL . '/?_route='); $ui->assign('_path', __DIR__); $ui->assign('_c', $config); $ui->assign('UPLOAD_PATH', str_replace($root_path, '', $UPLOAD_PATH)); @@ -66,8 +66,12 @@ if (isset($_SESSION['notify'])) { unset($_SESSION['ntype']); } -// Routing Engine -$req = _get('_route'); +if(!isset($_GET['_route'])) { + $req = ltrim(parse_url($_SERVER['REQUEST_URI'])['path'], '/'); +}else{ + // Routing Engine + $req = _get('_route'); +} $routes = explode('/', $req); $ui->assign('_routes', $routes); $handler = $routes[0]; diff --git a/system/lan/english.json b/system/lan/english.json index 6fa32501..9337da6a 100644 --- a/system/lan/english.json +++ b/system/lan/english.json @@ -701,5 +701,6 @@ "Failed_to_buy_package": "Failed to buy package", "New_Voucher_Created": "New Voucher Created", "New_Voucher_for_10mbps_Created": "New Voucher for 10mbps Created", - "Show_Chart": "Show Chart" + "Show_Chart": "Show Chart", + "": "" } \ No newline at end of file diff --git a/ui/ui/sections/footer.tpl b/ui/ui/sections/footer.tpl index 8d1cd480..5df993ad 100644 --- a/ui/ui/sections/footer.tpl +++ b/ui/ui/sections/footer.tpl @@ -7,12 +7,12 @@ target="_blank">AdminLTE - - - - - - + + + + + + {if isset($xfooter)} {$xfooter} diff --git a/ui/ui/sections/header.tpl b/ui/ui/sections/header.tpl index cd337197..e7d3ac49 100644 --- a/ui/ui/sections/header.tpl +++ b/ui/ui/sections/header.tpl @@ -5,18 +5,18 @@ {$_title} - {$_c['CompanyName']} - + - + - - - - - - - - + + + + + + + +