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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user