redirect
This commit is contained in:
@ -2,6 +2,11 @@ import { NextResponse } from "next/server";
|
||||
import type { NextRequest } from "next/server";
|
||||
|
||||
export async function middleware(request: NextRequest) {
|
||||
// Handle fuckcapcut.com domain redirect
|
||||
if (request.headers.get("host") === "fuckcapcut.com") {
|
||||
return NextResponse.redirect("https://opencut.app/why-not-capcut", 301);
|
||||
}
|
||||
|
||||
const path = request.nextUrl.pathname;
|
||||
|
||||
if (path === "/editor" && process.env.NODE_ENV === "production") {
|
||||
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
"redirects": [
|
||||
{
|
||||
"source": "/(.*)",
|
||||
"destination": "https://opencut.app/why-not-capcut",
|
||||
"host": "fuckcapcut.com",
|
||||
"permanent": true
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user