summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorNaglfar <naglfar@tilde.institute>2021-01-08 01:52:01 +0100
committerNaglfar <naglfar@tilde.institute>2021-01-08 01:52:01 +0100
commit6333f2f4a5a6dc14d74927ac8a3314414af5153a (patch)
tree8986b0df1d2000fbeb0c53e9b536bdff2b0c7270
parenta341f2bd9693e0157cd59726b1faf43d88f48601 (diff)
downloadMightyWVMS-6333f2f4a5a6dc14d74927ac8a3314414af5153a.tar.gz
Add index and Apache rewrite
-rw-r--r--.htaccess11
-rw-r--r--index.php22
2 files changed, 33 insertions, 0 deletions
diff --git a/.htaccess b/.htaccess
new file mode 100644
index 0000000..4a219a4
--- /dev/null
+++ b/.htaccess
@@ -0,0 +1,11 @@
+# Redirect to a custom page (RewriteEngine On)
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteRule ^(.*)$ /index.php/$1
+
+# Redirect your error to a Custom Page
+ErrorDocument 400 /
+ErrorDocument 401 /
+ErrorDocument 403 /
+ErrorDocument 404 /
+ErrorDocument 503 /
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..e5d86bf
--- /dev/null
+++ b/index.php
@@ -0,0 +1,22 @@
+<?php
+require 'php/definitions.php';	# Variables and constants definition
+# Interact with variables in the execution environment
+require 'php/ws-procedures.php';  # website specific
+require 'php/vm-procedures.php';  # video management
+?>
+<!DOCTYPE html>
+<html lang="<?php echo $mdata[3] ?>">
+<head>
+  <meta name="viewport" content="width=device-width,initial-scale=1.0">
+  <link rel="stylesheet" type="text/css" href="/theme/body-wrapper.css"/>
+  <title><?php printf("%s - %s", $vdata[2], $mdata[0]) ?></title>
+</head>
+<body>
+  <div id="body-wrapper">
+    <div id="header"></div>
+    <div id="content-wrapper"><?php require 'divs/content-wrapper.php' ?></div>
+    <div id="sidebar"><?php require 'divs/sidebar.php' ?></div>
+    <div id="footer"><?php require 'divs/footer.php' ?></div>
+  </div>
+</body>
+</html>