vitedge
vitedge copied to clipboard
Props redirect issue
From Discord via @subhendukundu:
Lets say I have these routes.
functions/props/docs/[slug].js and functions/props/docs.js
and in /docs.js
export default {
handler({ params = {}, query = {} }) {
return {
status: 302, // Any 3xx is accepted for a redirect
headers: {
location: "/docs/getting-started",
},
};
},
options: {
cache: {
api: 90,
html: 90,
},
},
};
And this is affecting in docs/[slug] paths as well.
yes. I have two routes.
- /docs
- docs/[slug] And I am trying to redirect user from /docs to /docs/getting-started
git clone -b props-route https://github.com/subhendukundu/vitedge-react-template.git