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