black-sheep-bluff/public/.htaccess
2026-09-18 06:46:56 +02:00

30 lines
1.2 KiB
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.

# Black Sheep Bluff – Front-Controller + Clean URLs (Docroot = /public)
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
# ── 301: alte URLs -> neue Clean URLs (SEO/Bookmarks) ──
RewriteRule ^index\.html$ / [R=301,L]
RewriteRule ^regeln\.html$ /regeln [R=301,L]
RewriteRule ^datenschutz\.php$ /datenschutz [R=301,L]
RewriteRule ^impressum\.php$ /impressum [R=301,L]
RewriteRule ^play\.html$ /play [R=301,L]
RewriteRule ^login\.php$ /login [R=301,L]
RewriteRule ^profile\.php$ /profile [R=301,L]
RewriteRule ^admin\.php$ /admin [R=301,L]
# alte JSON-Endpunkte (?action=X) auf /api/X bzw. /api/auth/X umbiegen
RewriteCond %{QUERY_STRING} (?:^|&)action=([A-Za-z0-9_]+)
RewriteRule ^api\.php$ /api/%1 [R=301,L,QSA]
RewriteCond %{QUERY_STRING} (?:^|&)action=([A-Za-z0-9_]+)
RewriteRule ^auth\.php$ /api/auth/%1 [R=301,L,QSA]
# ── echte Dateien/Ordner direkt ausliefern (assets, identity, uploads, config.js …) ──
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# ── alles andere -> Front-Controller ──
RewriteRule ^ index.php [L]
</IfModule>