Template
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:
3 files changed
+75
-19
No files matched your search
+1
-1
@@ -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é
|
||||
|
||||
Reference in new issue
Block a user