diff --git a/middleware.ts b/middleware.ts index e5e782e3..5181b052 100644 --- a/middleware.ts +++ b/middleware.ts @@ -83,7 +83,7 @@ export default async function middleware(req: NextRequest) { let aturi = new AtUri(pub?.uri); return NextResponse.rewrite( new URL( - `/lish/${aturi.host}/${encodeURIComponent(pub.name)}${req.nextUrl.pathname}`, + `/lish/${aturi.host}/${aturi.rkey}${req.nextUrl.pathname}`, req.url, ), );