From faa492c4718a3cf4356f9c368f8883a495f58ca3 Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Sat, 22 Nov 2025 01:53:41 +0100 Subject: [PATCH] update --- public/.htaccess | 14 ++++---------- public/auth/login.php | 3 +++ public/auth/logout.php | 3 +++ public/auth/register.php | 3 +++ 4 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 public/auth/login.php create mode 100644 public/auth/logout.php create mode 100644 public/auth/register.php diff --git a/public/.htaccess b/public/.htaccess index 374d47b..a5e9129 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -1,26 +1,20 @@ RewriteEngine On -# 1) Nur Root von *.ismyusbfake.com nach /fakecheck/ umleiten +# 1) Root von *.ismyusbfake.com nach /fakecheck/ umleiten RewriteCond %{HTTP_HOST} (^|\.)ismyusbfake\.com$ [NC] RewriteRule ^$ /fakecheck/ [L,R=301] -# 1b) Auth-Routen auf Backend-Handler außerhalb von /public/ mappen -# /auth/login -> ../src/auth/login.php -# /auth/register -> ../src/auth/register.php -# /auth/logout -> ../src/auth/logout.php -RewriteRule ^auth/login/?$ ../src/auth/login.php [L] -RewriteRule ^auth/register/?$ ../src/auth/register.php [L] -RewriteRule ^auth/logout/?$ ../src/auth/logout.php [L] - -# 2) Deine bisherigen Regeln +# 2) Wenn eine echte Datei oder Ordner existiert → direkt ausliefern RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] +# 3) /foo/bar -> /foo/bar.php (falls vorhanden) RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.+?)/?$ $1.php [L] +# 4) /foo/bar -> /foo/bar/index.php (falls vorhanden) RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}/index.php -f RewriteRule ^(.+?)/?$ $1/index.php [L] diff --git a/public/auth/login.php b/public/auth/login.php new file mode 100644 index 0000000..d7efe59 --- /dev/null +++ b/public/auth/login.php @@ -0,0 +1,3 @@ +