master
Kar 2025-01-30 17:03:27 +05:30
parent f7306b70c8
commit a176102cd9
53 changed files with 24 additions and 0 deletions

8
.htaccess Normal file
View File

@ -0,0 +1,8 @@
RewriteEngine On
#RewriteCond %{HTTPS} !=on
#RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php

16
index.php Normal file
View File

@ -0,0 +1,16 @@
<?php
require_once('../.hta_config/var.php');
$url = explode('/', $_SERVER['REQUEST_URI']);
if (strpos($url[1], "?") !== false) {
$url2 = explode('?', $url[1]);
$slug=$url2[0];
} else $slug=$url[2];
require_once('../.hta_slug/_header.php');
if($slug=="") require_once('.hta_slug/_home.php');
elseif(file_exists(".hta_slug/".$slug.".php")) include ".hta_slug/".$slug.".php";
else require_once('.hta_slug/_404.php');
require_once('../.hta_slug/_footer.php');