cleanup
This commit is contained in:
@@ -1,20 +1,42 @@
|
|||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
|
|
||||||
# 1) Root von *.ismyusbfake.com nach /fakecheck/ umleiten
|
# 1) Nur 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]
|
||||||
|
|
||||||
# 2) Wenn eine echte Datei oder Ordner existiert → direkt ausliefern
|
# 2) /uploads/avatar schützen
|
||||||
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
RewriteRule ^uploads/avatar/ - [F]
|
||||||
RewriteCond %{REQUEST_FILENAME} -d
|
|
||||||
RewriteRule ^ - [L]
|
|
||||||
|
|
||||||
# 3) /foo/bar -> /foo/bar.php (falls vorhanden)
|
# 3) Auth-Routen explizit (weiterhin so lassen)
|
||||||
|
RewriteRule ^auth/login/?$ auth/login.php [L]
|
||||||
|
RewriteRule ^auth/register/?$ auth/register.php [L]
|
||||||
|
RewriteRule ^auth/logout/?$ auth/logout.php [L]
|
||||||
|
|
||||||
|
# 4) Generische Landingpage-Regel
|
||||||
|
# /slug -> /landingpage/slug/index.php
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
|
||||||
|
# nichts versuchen für diese "System-Pfade"
|
||||||
|
RewriteCond %{REQUEST_URI} !^/(auth|assets|uploads|landingpage)/ [NC]
|
||||||
|
|
||||||
|
# Request muss die Form /irgendwas oder /irgendwas/ haben
|
||||||
|
RewriteCond %{REQUEST_URI} ^/([^/]+)/?$ [NC]
|
||||||
|
|
||||||
|
# Und es muss eine passende landingpage/{slug}/index.php geben
|
||||||
|
RewriteCond %{DOCUMENT_ROOT}/landingpage/%1/index.php -f
|
||||||
|
|
||||||
|
# Dann dorthin rewriten
|
||||||
|
RewriteRule ^ landingpage/%1/index.php [L]
|
||||||
|
|
||||||
|
# 5) Deine bisherigen Fallback-Regeln
|
||||||
|
|
||||||
|
# a) /foo -> foo.php
|
||||||
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)
|
# b) /foo -> foo/index.php
|
||||||
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]
|
||||||
|
|||||||
Reference in New Issue
Block a user