{{-- Canonical URL of the landing pages, shared by the landingempresas and landing2 head layouts. It is also emitted as og:url so both always match. Rules (config/seo.php): a shared marketing path points to the canonical host, any other page points to itself. No query string and no trailing slash; the root is "/". --}} @php $seoPath = rtrim(request()->getPathInfo(), '/'); $seoPath = $seoPath === '' ? '/' : $seoPath; $seoCanonicalHost = config('seo.canonical_host'); $seoShared = request()->is(...config('seo.shared_paths', [])); // The root of any other host (contable.*, turecibo.*, ...) is that host's own home // page, not a copy of the canonical host's home: it keeps its own canonical. if ($seoPath === '/' && request()->getHost() !== $seoCanonicalHost) { $seoShared = false; } $seoCanonical = ($seoShared ? 'https://' . $seoCanonicalHost : request()->getSchemeAndHttpHost()) . $seoPath; @endphp