update
This commit is contained in:
51
public/.htaccess
Normal file
51
public/.htaccess
Normal file
@@ -0,0 +1,51 @@
|
||||
RewriteEngine On
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 2) Uploads schützen
|
||||
# ---------------------------------------------------------
|
||||
RewriteRule ^uploads/avatar/ - [F]
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 3) Auth-Routen
|
||||
# ---------------------------------------------------------
|
||||
RewriteRule ^auth/login/?$ auth/login.php [L]
|
||||
RewriteRule ^auth/register/?$ auth/register.php [L]
|
||||
RewriteRule ^auth/logout/?$ auth/logout.php [L]
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 4) Tools-Regel
|
||||
# /tools/foo.php → landingpage/tools/foo.php
|
||||
# ---------------------------------------------------------
|
||||
RewriteCond %{REQUEST_URI} ^/tools/ [NC]
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^tools/(.*)$ landingpage/tools/$1 [L]
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 5) Generische Landingpage-Regel
|
||||
# ---------------------------------------------------------
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} !^/(auth|assets|uploads|landingpage|tools|_errors)/ [NC]
|
||||
RewriteCond %{REQUEST_URI} ^/([^/]+)/?$ [NC]
|
||||
RewriteCond %{DOCUMENT_ROOT}/landingpage/%1/index.php -f
|
||||
RewriteRule ^ landingpage/%1/index.php [L]
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 6) Fallback-Regeln (.php und /index.php)
|
||||
# ---------------------------------------------------------
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME}.php -f
|
||||
RewriteRule ^(.+?)/?$ $1.php [L]
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME}/index.php -f
|
||||
RewriteRule ^(.+?)/?$ $1/index.php [L]
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 7) Globaler 404-Fallback
|
||||
# ---------------------------------------------------------
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} !^/(assets|uploads|auth|landingpage|tools|_errors)/ [NC]
|
||||
RewriteRule ^ _errors/404.php [L]
|
||||
Reference in New Issue
Block a user