Skip to content
Discussion options

You must be logged in to vote

There is an experimental (soon to be released to stable) feature for rewrites and redirects. If you install the latest canary (9.4.5-canary.43) you can access it like this below:

next.config.js

module.exports = {
    async redirects() {
      return [
        {
          source: '/Car',
          destination: '/services/car_services',
          permanent: true
        }
      ]
    }
}

or with rewrites

module.exports = {
  async rewrites() {
    return [
      {
        source: '/Car',
        destination: '/services/car_services',
      },
    ];
  },
};

Here is the RFC

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Sandeep06Dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants