Skip to content

Commit 471e4ab

Browse files
Added default subdomain boilerplate because no one has the decency to write it themselves.
1 parent 94fb2f1 commit 471e4ab

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
RewriteEngine On
2+
RewriteBase /
3+
4+
# Block direct access to system/storage directory
5+
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
6+
7+
# Rewrite Rules for general routing
8+
RewriteCond %{REQUEST_FILENAME} !-f
9+
RewriteCond %{REQUEST_FILENAME} !-d
10+
RewriteCond %{REQUEST_URI} !\.(ico|gif|jpg|jpeg|png|webp|js|css|svg)$ [NC]
11+
RewriteRule ^(.*)$ index.php?_route_=$1 [L,QSA]
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
/*
3+
* Spindle CMS
4+
* Copyright (c) 2025. All rights reserved.
5+
*
6+
* This file is part of the Spindle CMS project — a lightweight, modular PHP content framework derived from OpenCart.
7+
*
8+
* @license GNU General Public License v3.0 (GPL-3.0-or-later)
9+
* @link https://github.com/RandomCoderTinker/Spindle
10+
*/
11+
12+
// Version & Framework
13+
const VERSION = '1.0.0.0';
14+
const FRAMEWORK = 'app';
15+
16+
// Set Timezone if not set
17+
if (!ini_get('date.timezone')) date_default_timezone_set('UTC');
18+
19+
// Configuration
20+
$constPath = dirname(__DIR__, 3) . '/storage/config/const.config.php';
21+
if (is_file($constPath)) {
22+
require_once $constPath;
23+
}
24+
25+
// Load Core
26+
require_once(dirname(__DIR__, 2) . '/system/engine/autoloader.php');
27+
require_once(dirname(__DIR__, 2) . '/system/engine/config.php');
28+
29+
// Require the init
30+
require_once(dirname(__DIR__, 2) . '/system/engine/init.php');
31+
32+
33+

0 commit comments

Comments
 (0)