Skip to content

[Bug]: Trailing slash not working #1329

Closed as not planned
Closed as not planned
@scajal

Description

@scajal

Summary

The option trailingSlash: true is not working when deploying a site.
The site also has Pretty URLs option activated in the deploy settings.
Some links work with the slash (but have both versions, which is bad for SEO).

The only pages that are working with trailing slash are server side pages.

Steps to reproduce

  1. Access https://cerulean-travesseiro-e6b413.netlify.app/ and visit the different links

A link to a reproduction repository

https://github.com/scajal/netlify-test

Plugin version

4.7.0

More information about your build

  • I am building using the CLI
  • I am building using file-based configuration (netlify.toml)

What OS are you using?

No response

Your netlify.toml file

`netlify.toml`
# Paste content of your `netlify.toml` file here

Your public/_redirects file

`_redirects`
# Paste content of your `_redirects` file here

Your next.config.js file

`next.config.js`
/** @type {import('next').NextConfig} */
const nextConfig = {
	/** @see https://nextjs.org/docs/api-reference/next.config.js/react-strict-mode */
	reactStrictMode: true,

	/** @see https://nextjs.org/docs/api-reference/next.config.js/trailing-slash */
	trailingSlash: true,
};

module.exports = nextConfig;

Builds logs (or link to your logs)

Build logs

Function logs

Function logs

.next JSON files

generated .next JSON files
# Paste file contents here. Please check there isn't any private info in them
# You can either build locally, or download the deploy from Netlify by clicking the arrow next to the deploy time.

Metadata

Metadata

Assignees

Labels

type: bugcode to address defects in shipped code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions