This commit is contained in:
2025-11-19 02:46:18 +01:00
parent 87def54f3d
commit b826c55559
2 changed files with 76 additions and 0 deletions

18
public/.htaccess Normal file
View File

@@ -0,0 +1,18 @@
RewriteEngine On
# 0) Echte Dateien oder Ordner direkt ausliefern (wichtig für CSS/JS/Bilder)
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# 1) /test/eins -> /test/eins.php (wenn existiert)
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+)$ $1.php [L]
# 2) /test/eins -> /test/eins/index.php (wenn existiert)
RewriteCond %{REQUEST_FILENAME}/index.php -f
RewriteRule ^(.+)$ $1/index.php [L]
# 3) Wenn nichts davon zutrifft:
# Apache versucht, die URL normal zu bedienen → keine Datei → 404.
# (Kein extra Rewrite nötig)