Skip to content

[Bug]: Redirects are not working in the deployed application #1876

Closed as not planned
@lukasholzer

Description

@lukasholzer

Summary

When I create a app with netlify and add a _redirects file and serve it with ntl dev it's working on the deployed app it's not

Steps to reproduce

  1. Clone this repo: https://github.com/lukasholzer/netlify-next-redirect-issue
  2. Ntl dev (on the home page it should use the redirect)
  3. Check out the deployed version (not working) https://main--euphonious-swan-75085e.netlify.app/

The site: https://app.netlify.com/sites/euphonious-swan-75085e/overview

A link to a reproduction repository

https://github.com/lukasholzer/netlify-next-redirect-issue

Next Runtime version

should be the latest in the CI

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?

Mac OS

Your netlify.toml file

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

Your public/_redirects file

`_redirects`
/       /foo

Your next.config.js file

`next.config.js`
# Paste content of your `next.config.js` file here. Check there is no private info in there.

Builds logs (or link to your logs)

Build logs
# Paste logs here

Function logs

Function logs
# Paste logs here

.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

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions