diff --git a/e2e/Redirects.spec.ts b/e2e/Redirects.spec.ts index cd5dc9d5..3dbc4a23 100644 --- a/e2e/Redirects.spec.ts +++ b/e2e/Redirects.spec.ts @@ -1,5 +1,8 @@ import { test } from "@playwright/test"; -import { expectDownloadPage } from "./utils/PageUtils"; +import { + expectDownloadPage, + expectTrademarkUsagePage, +} from "./utils/PageUtils"; test.describe("Website Redirects", () => { test("redirects old /cloud-images to /download", async ({ page }) => { @@ -7,4 +10,9 @@ test.describe("Website Redirects", () => { await expectDownloadPage(page); }); + test("redirects old /trademark to /legal/trademarks", async ({ page }) => { + await page.goto("/trademark"); + + await expectTrademarkUsagePage(page); + }); }); diff --git a/e2e/utils/PageUtils.ts b/e2e/utils/PageUtils.ts index f5c0e280..7521430e 100644 --- a/e2e/utils/PageUtils.ts +++ b/e2e/utils/PageUtils.ts @@ -4,3 +4,8 @@ export const expectDownloadPage = async (page: Page) => { await expect(page).toHaveURL(/\/download/); await expect(page).toHaveTitle(/Download - Rocky Linux/); }; + +export const expectTrademarkUsagePage = async (page: Page) => { + await expect(page).toHaveURL(/\/legal\/trademarks/); + await expect(page).toHaveTitle(/Trademark Usage - Rocky Linux/); +}; diff --git a/next.config.js b/next.config.js index f97b892d..ff42d3bb 100644 --- a/next.config.js +++ b/next.config.js @@ -3,7 +3,14 @@ const withNextIntl = require("next-intl/plugin")("./i18n.ts"); /** @type {import('next').NextConfig} */ const nextConfig = { images: { - domains: ["www.rockylinux.org", "rockylinux.org"], + remotePatterns: [ + { + hostname: "www.rockylinux.org", + }, + { + hostname: "rockylinux.org", + }, + ], }, async redirects() { return [ @@ -12,6 +19,11 @@ const nextConfig = { destination: "/download", permanent: true, }, + { + source: "/trademark", + destination: "/legal/trademarks", + permanent: true, + }, ]; }, };