This commit is contained in:
2025-11-19 22:06:09 +01:00
parent fe9d9c6737
commit 9e0c5dc015

View File

@@ -1,20 +0,0 @@
RewriteEngine On
# 0) Echte Dateien und Ordner direkt ausliefern
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# 1) /foo/bar -> foo/bar.php
# Nur wenn REQUEST_FILENAME KEIN Verzeichnis ist (!!)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+?)/?$ $1.php [L]
# 2) /foo/bar -> foo/bar/index.php
# Wieder nur wenn KEIN Verzeichnis (!!)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}/index.php -f
RewriteRule ^(.+?)/?$ $1/index.php [L]
# 3) Wenn nichts passt -> nichts rewriten → Apache liefert normalen 404