Add htaccess
This commit is contained in:
11
.htaccess
Normal file
11
.htaccess
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Options -MultiViews
|
||||||
|
Options -Indexes
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
# Uncomment the below if the code is not on the root level
|
||||||
|
# RewriteBase /
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-l
|
||||||
|
|
||||||
|
RewriteRule ^(.*)$ index.php [QSA,L]
|
||||||
@@ -16,7 +16,7 @@ include './custom/settings/config.php';
|
|||||||
// Include functions and connect to the database using PDO MySQL
|
// Include functions and connect to the database using PDO MySQL
|
||||||
include 'functions.php';
|
include 'functions.php';
|
||||||
// Include translation file
|
// Include translation file
|
||||||
include './custom/translations/translations/translations_'.strtoupper(language_code).'.php';
|
include './custom/translations/translations_'.strtoupper(language_code).'.php';
|
||||||
// Connect to MySQL database
|
// Connect to MySQL database
|
||||||
$pdo = pdo_connect_mysql();
|
$pdo = pdo_connect_mysql();
|
||||||
// Output error variable
|
// Output error variable
|
||||||
@@ -65,7 +65,8 @@ $url = routes([
|
|||||||
'/faq'=> '/custom/pages/faq.php',
|
'/faq'=> '/custom/pages/faq.php',
|
||||||
'/privacy'=> '/custom/pages/privacy.php',
|
'/privacy'=> '/custom/pages/privacy.php',
|
||||||
'/privacy/{download}'=> '/custom/pages/privacy.php',
|
'/privacy/{download}'=> '/custom/pages/privacy.php',
|
||||||
'/instructions-for-use' => '/custom/pages/faq.php'
|
'/instructions-for-use' => '/custom/pages/faq.php',
|
||||||
|
'/test' => 'test.php'
|
||||||
]);
|
]);
|
||||||
// Check if route exists
|
// Check if route exists
|
||||||
if ($url) {
|
if ($url) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
define('interface', true);
|
define('interface', true);
|
||||||
|
|
||||||
// Include the configuration file, this contains settings you can change.
|
// Include the configuration file, this contains settings you can change.
|
||||||
include 'config.php';
|
include '/custom/settings/config.php';
|
||||||
// Include functions and connect to the database using PDO MySQL
|
// Include functions and connect to the database using PDO MySQL
|
||||||
include 'functions.php';
|
include 'functions.php';
|
||||||
// Connect to MySQL database
|
// Connect to MySQL database
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
// Include the configuration file, this contains settings you can change.
|
// Include the configuration file, this contains settings you can change.
|
||||||
include 'config.php';
|
include '/custom/settings/config.php';
|
||||||
// Include functions and connect to the database using PDO MySQL
|
// Include functions and connect to the database using PDO MySQL
|
||||||
include 'functions.php';
|
include 'functions.php';
|
||||||
// Connect to MySQL database
|
// Connect to MySQL database
|
||||||
|
|||||||
Reference in New Issue
Block a user