From f1de200650ea1ea701e2dd4ba40d88a6fdba8b76 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Fri, 5 Sep 2025 13:22:24 +0000 Subject: [PATCH] Initial version --- .gitignore | 3 ++ .htaccess | 18 +++++++++ db/config.php | 17 +++++++++ index.php | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 141 insertions(+) create mode 100644 .gitignore create mode 100644 .htaccess create mode 100644 db/config.php create mode 100644 index.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e427ff3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +*/node_modules/ +*/build/ diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..e2bbc23 --- /dev/null +++ b/.htaccess @@ -0,0 +1,18 @@ +DirectoryIndex index.php index.html +Options -Indexes +Options -MultiViews + +RewriteEngine On + +# 0) Serve existing files/directories as-is +RewriteCond %{REQUEST_FILENAME} -f [OR] +RewriteCond %{REQUEST_FILENAME} -d +RewriteRule ^ - [L] + +# 1) Internal map: /page or /page/ -> /page.php (if such PHP file exists) +RewriteCond %{REQUEST_FILENAME}.php -f +RewriteRule ^(.+?)/?$ $1.php [L] + +# 2) Optional: strip trailing slash for non-directories (keeps .php links working) +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.+)/$ $1 [R=301,L] diff --git a/db/config.php b/db/config.php new file mode 100644 index 0000000..d04425f --- /dev/null +++ b/db/config.php @@ -0,0 +1,17 @@ + PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + ]); + } + return $pdo; +} diff --git a/index.php b/index.php new file mode 100644 index 0000000..f7ae6b8 --- /dev/null +++ b/index.php @@ -0,0 +1,103 @@ + + + + + + + New Style + + + + + + +
+
+

Welcome!

+

Your project is ready to conquer the peaks.

+

PHP version:

+
+
+ + + \ No newline at end of file