This commit is contained in:
2025-11-22 01:53:41 +01:00
parent b3a3d25502
commit faa492c471
4 changed files with 13 additions and 10 deletions

View File

@@ -1,26 +1,20 @@
RewriteEngine On 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] RewriteCond %{HTTP_HOST} (^|\.)ismyusbfake\.com$ [NC]
RewriteRule ^$ /fakecheck/ [L,R=301] RewriteRule ^$ /fakecheck/ [L,R=301]
# 1b) Auth-Routen auf Backend-Handler außerhalb von /public/ mappen # 2) Wenn eine echte Datei oder Ordner existiert → direkt ausliefern
# /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
RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L] RewriteRule ^ - [L]
# 3) /foo/bar -> /foo/bar.php (falls vorhanden)
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+?)/?$ $1.php [L] RewriteRule ^(.+?)/?$ $1.php [L]
# 4) /foo/bar -> /foo/bar/index.php (falls vorhanden)
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}/index.php -f RewriteCond %{REQUEST_FILENAME}/index.php -f
RewriteRule ^(.+?)/?$ $1/index.php [L] RewriteRule ^(.+?)/?$ $1/index.php [L]

3
public/auth/login.php Normal file
View File

@@ -0,0 +1,3 @@
<?php
require __DIR__ . '/../../config/fileload.php';
require __DIR__ . '/../../src/auth/login.php';

3
public/auth/logout.php Normal file
View File

@@ -0,0 +1,3 @@
<?php
require __DIR__ . '/../../config/fileload.php';
require __DIR__ . '/../../src/auth/logout.php';

3
public/auth/register.php Normal file
View File

@@ -0,0 +1,3 @@
<?php
require __DIR__ . '/../../config/fileload.php';
require __DIR__ . '/../../src/auth/register.php';