fix(core): resolve site URLs against a dynamic base URL

WAMP/XAMPP serve the site from a subfolder of www while production
serves it from the domain root; root-absolute URLs broke every page
and asset on Windows. Add fws_base_url()/fws_url() and route all
shell URLs (nav, footer, logos, canonical, package thumbnails)
through them, with path-form route detection adjusted for
subfolder deployments.
This commit is contained in:
BlackAngelTV committed 2026-09-16 14:35:24 +02:00
1 parent 6b6b07aa83
commit da74767843
3 files changed
+75 -19

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ function fws_asset(string $path): string
{
$abs = FWS_SITE_ROOT . $path;
$mtime = @filemtime($abs);
return $mtime ? $path . '?v=' . $mtime : $path;
return fws_url($path) . ($mtime ? '?v=' . $mtime : '');
}
/* fws_utf8_str / fws_utf8_arr sont définies dans api/bugs/db.php (chargé