Getting error on putting a trailing slash even after trailingSlash: false in Next.js

25 views Asked by At

When I put a trailing slash like www.example.com/test/ I get this error -

Not Found The requested URL was not found on this server.

Also I have a page with more subpages, so when I reload the page the trailing slash gets added automatically and this error occurs.

I tried adding trailingSlash: false in my next.config.js file -

/** @type {import('next').NextConfig} */ const nextConfig = { output: "export", images: { unoptimized: true, }, trailingSlash: false, };

module. Exports = nextConfig;

0

There are 0 answers