Mirrors the old site's Bildergalerie structure: a brand tile grid at /galerie, project tiles within a brand, and a photo grid with a lightbox for each project. Backed by new gallery_brands/gallery_projects/ gallery_photos tables and admin CRUD pages, gated by a new gallery.manage permission. Also fixes a real bug found while testing photo uploads: Apache's mod_dir was redirecting POST /api/uploads to /api/uploads/ (a trailing slash) because api/uploads/ exists as a real directory, silently dropping the multipart body on every image upload across the whole app. Fixed via DirectorySlash Off in .htaccess. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
22 lines
873 B
ApacheConf
22 lines
873 B
ApacheConf
RewriteEngine On
|
|
RewriteBase /
|
|
|
|
# Ohne dies leitet Apache (mod_dir) Anfragen an /api/uploads mit einem 301 auf
|
|
# /api/uploads/ um, bevor mod_rewrite greifen kann - weil api/uploads/ als
|
|
# echtes Verzeichnis existiert. Bei einem POST mit Datei-Upload geht dabei der
|
|
# Body verloren (der Browser sendet den redirect als GET nach), wodurch der
|
|
# Upload mit "Methode nicht erlaubt" fehlschlägt.
|
|
DirectorySlash Off
|
|
|
|
# API-Requests an den PHP-Front-Controller weiterleiten
|
|
RewriteCond %{REQUEST_URI} ^/api/
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
RewriteRule ^api/(.*)$ api/public/index.php [QSA,L]
|
|
|
|
# Dynamische sitemap.xml (DB-generiert)
|
|
RewriteRule ^sitemap\.xml$ api/public/sitemap.php [L]
|
|
|
|
# Alles andere: SPA-Fallback auf index.html (React Router übernimmt das Routing)
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
RewriteRule ^ index.html [QSA,L]
|