fix: ensure canonical URLs match actual URLs with locale prefix

- Update [slug]/page.tsx to always include locale in canonical URL
- Update by-oil/page.tsx to use consistent locale prefix
- Update by-concern/page.tsx to use consistent locale prefix
- All canonical URLs now match actual URLs: /{locale}/solutions/{slug}
This commit is contained in:
Unchained
2026-04-09 10:50:54 +02:00
parent 04d8d773bf
commit 14d7a3e21a
4 changed files with 120 additions and 5 deletions

View File

@@ -19,7 +19,7 @@ export async function generateMetadata({
const t = await getTranslations({ locale: validLocale, namespace: "Solutions.ByOil" });
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://manoonoils.com";
const localePrefix = validLocale === DEFAULT_LOCALE ? "/sr" : `/${validLocale}`;
const localePrefix = `/${validLocale}`;
const canonicalUrl = `${baseUrl}${localePrefix}/solutions/by-oil`;
return {