4

I have a problem with Next.js Trailing Slash on some pages, I am using media query like:

/test?type=something

but with a trailing slash, I am getting

/test/?type=something

Is there any solution to remove the trailing slash on some specific pages?

Yasin Br
  • 1,675
  • 1
  • 6
  • 16
Sarang Sami
  • 632
  • 1
  • 6
  • 13

1 Answers1

0

currently, You can only set the behavior for all pages.

according to the Next.js documentation:

Open next.config.js and config the trailingSlash:

module.exports = {
  trailingSlash: true/false,
}
Mile Mijatović
  • 2,948
  • 2
  • 22
  • 41
Yasin Br
  • 1,675
  • 1
  • 6
  • 16