fix: redirect clean up
This commit is contained in:
@@ -72,7 +72,15 @@ const nextConfig = {
|
||||
|
||||
// https://nextjs.org/docs/app/api-reference/next-config-js/redirects#header-cookie-and-query-matching
|
||||
redirects() {
|
||||
// const rateQueries = [
|
||||
return [
|
||||
// {
|
||||
// ----------------------------------------
|
||||
// Uncomment when Team Explorer has deployed
|
||||
// the select room submission
|
||||
// ----------------------------------------
|
||||
// source: "/:lang/hotelreservation/(select-bed|breakfast|details|payment)",
|
||||
// destination: "/:lang/hotelreservation/select-rate",
|
||||
// missing: [
|
||||
// {
|
||||
// key: "hotel",
|
||||
// type: "query",
|
||||
@@ -93,18 +101,37 @@ const nextConfig = {
|
||||
// type: "query",
|
||||
// value: undefined,
|
||||
// },
|
||||
// ]
|
||||
const bedTypeQuery = {
|
||||
// ],
|
||||
// permanent: false,
|
||||
// },
|
||||
{
|
||||
source: "/:lang/hotelreservation/(breakfast|details|payment)",
|
||||
destination: "/:lang/hotelreservation/select-bed",
|
||||
missing: [
|
||||
{
|
||||
key: "bedType",
|
||||
type: "query",
|
||||
value: undefined,
|
||||
}
|
||||
const breakfastQuery = {
|
||||
},
|
||||
],
|
||||
permanent: false,
|
||||
},
|
||||
{
|
||||
source: "/:lang/hotelreservation/(details|payment)",
|
||||
destination: "/:lang/hotelreservation/breakfast",
|
||||
missing: [
|
||||
{
|
||||
key: "breakfast",
|
||||
type: "query",
|
||||
value: undefined,
|
||||
}
|
||||
const detailQueries = [
|
||||
},
|
||||
],
|
||||
permanent: false,
|
||||
},
|
||||
{
|
||||
source: "/:lang/hotelreservation/payment",
|
||||
destination: "/:lang/hotelreservation/details",
|
||||
missing: [
|
||||
{
|
||||
key: "countryCode",
|
||||
type: "query",
|
||||
@@ -130,53 +157,7 @@ const nextConfig = {
|
||||
type: "query",
|
||||
value: undefined,
|
||||
},
|
||||
]
|
||||
|
||||
return [
|
||||
// {
|
||||
// ----------------------------------------
|
||||
// Uncomment when Team Explorer has deployed
|
||||
// the select room submission
|
||||
// ----------------------------------------
|
||||
// source: "/:lang/hotelreservation/(select-bed|breakfast|details|payment)",
|
||||
// destination: "/:lang/hotelreservation/select-rate",
|
||||
// missing: rateQueries,
|
||||
// permanent: false,
|
||||
// },
|
||||
{
|
||||
source: "/:lang/hotelreservation/breakfast",
|
||||
destination: "/:lang/hotelreservation/select-bed",
|
||||
missing: [bedTypeQuery],
|
||||
permanent: false,
|
||||
},
|
||||
{
|
||||
source: "/:lang/hotelreservation/details",
|
||||
destination: "/:lang/hotelreservation/select-bed",
|
||||
missing: [bedTypeQuery],
|
||||
permanent: false,
|
||||
},
|
||||
{
|
||||
source: "/:lang/hotelreservation/details",
|
||||
destination: "/:lang/hotelreservation/breakfast",
|
||||
missing: [breakfastQuery],
|
||||
permanent: false,
|
||||
},
|
||||
{
|
||||
source: "/:lang/hotelreservation/payment",
|
||||
destination: "/:lang/hotelreservation/select-bed",
|
||||
missing: [bedTypeQuery],
|
||||
permanent: false,
|
||||
},
|
||||
{
|
||||
source: "/:lang/hotelreservation/payment",
|
||||
destination: "/:lang/hotelreservation/breakfast",
|
||||
missing: [breakfastQuery],
|
||||
permanent: false,
|
||||
},
|
||||
{
|
||||
source: "/:lang/hotelreservation/payment",
|
||||
destination: "/:lang/hotelreservation/details",
|
||||
missing: detailQueries,
|
||||
],
|
||||
permanent: false,
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user