Files
usbcheck.it/public/.htaccess
2025-11-19 22:06:28 +01:00

21 lines
633 B
ApacheConf
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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