diff --git a/e2e/react-start/server-functions/src/routeTree.gen.ts b/e2e/react-start/server-functions/src/routeTree.gen.ts
index b5692de059..4f9cea05de 100644
--- a/e2e/react-start/server-functions/src/routeTree.gen.ts
+++ b/e2e/react-start/server-functions/src/routeTree.gen.ts
@@ -22,11 +22,13 @@ import { Route as DeadCodePreserveRouteImport } from './routes/dead-code-preserv
 import { Route as ConsistentRouteImport } from './routes/consistent'
 import { Route as AbortSignalRouteImport } from './routes/abort-signal'
 import { Route as IndexRouteImport } from './routes/index'
+import { Route as RedirectTestIndexRouteImport } from './routes/redirect-test/index'
 import { Route as PrimitivesIndexRouteImport } from './routes/primitives/index'
 import { Route as MiddlewareIndexRouteImport } from './routes/middleware/index'
 import { Route as FormdataRedirectIndexRouteImport } from './routes/formdata-redirect/index'
 import { Route as FactoryIndexRouteImport } from './routes/factory/index'
 import { Route as CookiesIndexRouteImport } from './routes/cookies/index'
+import { Route as RedirectTestTargetRouteImport } from './routes/redirect-test/target'
 import { Route as MiddlewareSendServerFnRouteImport } from './routes/middleware/send-serverFn'
 import { Route as MiddlewareRequestMiddlewareRouteImport } from './routes/middleware/request-middleware'
 import { Route as MiddlewareClientMiddlewareRouterRouteImport } from './routes/middleware/client-middleware-router'
@@ -98,6 +100,11 @@ const IndexRoute = IndexRouteImport.update({
   path: '/',
   getParentRoute: () => rootRouteImport,
 } as any)
+const RedirectTestIndexRoute = RedirectTestIndexRouteImport.update({
+  id: '/redirect-test/',
+  path: '/redirect-test/',
+  getParentRoute: () => rootRouteImport,
+} as any)
 const PrimitivesIndexRoute = PrimitivesIndexRouteImport.update({
   id: '/primitives/',
   path: '/primitives/',
@@ -123,6 +130,11 @@ const CookiesIndexRoute = CookiesIndexRouteImport.update({
   path: '/cookies/',
   getParentRoute: () => rootRouteImport,
 } as any)
+const RedirectTestTargetRoute = RedirectTestTargetRouteImport.update({
+  id: '/redirect-test/target',
+  path: '/redirect-test/target',
+  getParentRoute: () => rootRouteImport,
+} as any)
 const MiddlewareSendServerFnRoute = MiddlewareSendServerFnRouteImport.update({
   id: '/middleware/send-serverFn',
   path: '/middleware/send-serverFn',
@@ -170,11 +182,13 @@ export interface FileRoutesByFullPath {
   '/middleware/client-middleware-router': typeof MiddlewareClientMiddlewareRouterRoute
   '/middleware/request-middleware': typeof MiddlewareRequestMiddlewareRoute
   '/middleware/send-serverFn': typeof MiddlewareSendServerFnRoute
+  '/redirect-test/target': typeof RedirectTestTargetRoute
   '/cookies': typeof CookiesIndexRoute
   '/factory': typeof FactoryIndexRoute
   '/formdata-redirect': typeof FormdataRedirectIndexRoute
   '/middleware': typeof MiddlewareIndexRoute
   '/primitives': typeof PrimitivesIndexRoute
+  '/redirect-test': typeof RedirectTestIndexRoute
   '/formdata-redirect/target/$name': typeof FormdataRedirectTargetNameRoute
 }
 export interface FileRoutesByTo {
@@ -195,11 +209,13 @@ export interface FileRoutesByTo {
   '/middleware/client-middleware-router': typeof MiddlewareClientMiddlewareRouterRoute
   '/middleware/request-middleware': typeof MiddlewareRequestMiddlewareRoute
   '/middleware/send-serverFn': typeof MiddlewareSendServerFnRoute
+  '/redirect-test/target': typeof RedirectTestTargetRoute
   '/cookies': typeof CookiesIndexRoute
   '/factory': typeof FactoryIndexRoute
   '/formdata-redirect': typeof FormdataRedirectIndexRoute
   '/middleware': typeof MiddlewareIndexRoute
   '/primitives': typeof PrimitivesIndexRoute
+  '/redirect-test': typeof RedirectTestIndexRoute
   '/formdata-redirect/target/$name': typeof FormdataRedirectTargetNameRoute
 }
 export interface FileRoutesById {
@@ -221,11 +237,13 @@ export interface FileRoutesById {
   '/middleware/client-middleware-router': typeof MiddlewareClientMiddlewareRouterRoute
   '/middleware/request-middleware': typeof MiddlewareRequestMiddlewareRoute
   '/middleware/send-serverFn': typeof MiddlewareSendServerFnRoute
+  '/redirect-test/target': typeof RedirectTestTargetRoute
   '/cookies/': typeof CookiesIndexRoute
   '/factory/': typeof FactoryIndexRoute
   '/formdata-redirect/': typeof FormdataRedirectIndexRoute
   '/middleware/': typeof MiddlewareIndexRoute
   '/primitives/': typeof PrimitivesIndexRoute
+  '/redirect-test/': typeof RedirectTestIndexRoute
   '/formdata-redirect/target/$name': typeof FormdataRedirectTargetNameRoute
 }
 export interface FileRouteTypes {
@@ -248,11 +266,13 @@ export interface FileRouteTypes {
     | '/middleware/client-middleware-router'
     | '/middleware/request-middleware'
     | '/middleware/send-serverFn'
+    | '/redirect-test/target'
     | '/cookies'
     | '/factory'
     | '/formdata-redirect'
     | '/middleware'
     | '/primitives'
+    | '/redirect-test'
     | '/formdata-redirect/target/$name'
   fileRoutesByTo: FileRoutesByTo
   to:
@@ -273,11 +293,13 @@ export interface FileRouteTypes {
     | '/middleware/client-middleware-router'
     | '/middleware/request-middleware'
     | '/middleware/send-serverFn'
+    | '/redirect-test/target'
     | '/cookies'
     | '/factory'
     | '/formdata-redirect'
     | '/middleware'
     | '/primitives'
+    | '/redirect-test'
     | '/formdata-redirect/target/$name'
   id:
     | '__root__'
@@ -298,11 +320,13 @@ export interface FileRouteTypes {
     | '/middleware/client-middleware-router'
     | '/middleware/request-middleware'
     | '/middleware/send-serverFn'
+    | '/redirect-test/target'
     | '/cookies/'
     | '/factory/'
     | '/formdata-redirect/'
     | '/middleware/'
     | '/primitives/'
+    | '/redirect-test/'
     | '/formdata-redirect/target/$name'
   fileRoutesById: FileRoutesById
 }
@@ -324,11 +348,13 @@ export interface RootRouteChildren {
   MiddlewareClientMiddlewareRouterRoute: typeof MiddlewareClientMiddlewareRouterRoute
   MiddlewareRequestMiddlewareRoute: typeof MiddlewareRequestMiddlewareRoute
   MiddlewareSendServerFnRoute: typeof MiddlewareSendServerFnRoute
+  RedirectTestTargetRoute: typeof RedirectTestTargetRoute
   CookiesIndexRoute: typeof CookiesIndexRoute
   FactoryIndexRoute: typeof FactoryIndexRoute
   FormdataRedirectIndexRoute: typeof FormdataRedirectIndexRoute
   MiddlewareIndexRoute: typeof MiddlewareIndexRoute
   PrimitivesIndexRoute: typeof PrimitivesIndexRoute
+  RedirectTestIndexRoute: typeof RedirectTestIndexRoute
   FormdataRedirectTargetNameRoute: typeof FormdataRedirectTargetNameRoute
 }
 
@@ -425,6 +451,13 @@ declare module '@tanstack/react-router' {
       preLoaderRoute: typeof IndexRouteImport
       parentRoute: typeof rootRouteImport
     }
+    '/redirect-test/': {
+      id: '/redirect-test/'
+      path: '/redirect-test'
+      fullPath: '/redirect-test'
+      preLoaderRoute: typeof RedirectTestIndexRouteImport
+      parentRoute: typeof rootRouteImport
+    }
     '/primitives/': {
       id: '/primitives/'
       path: '/primitives'
@@ -460,6 +493,13 @@ declare module '@tanstack/react-router' {
       preLoaderRoute: typeof CookiesIndexRouteImport
       parentRoute: typeof rootRouteImport
     }
+    '/redirect-test/target': {
+      id: '/redirect-test/target'
+      path: '/redirect-test/target'
+      fullPath: '/redirect-test/target'
+      preLoaderRoute: typeof RedirectTestTargetRouteImport
+      parentRoute: typeof rootRouteImport
+    }
     '/middleware/send-serverFn': {
       id: '/middleware/send-serverFn'
       path: '/middleware/send-serverFn'
@@ -516,11 +556,13 @@ const rootRouteChildren: RootRouteChildren = {
   MiddlewareClientMiddlewareRouterRoute: MiddlewareClientMiddlewareRouterRoute,
   MiddlewareRequestMiddlewareRoute: MiddlewareRequestMiddlewareRoute,
   MiddlewareSendServerFnRoute: MiddlewareSendServerFnRoute,
+  RedirectTestTargetRoute: RedirectTestTargetRoute,
   CookiesIndexRoute: CookiesIndexRoute,
   FactoryIndexRoute: FactoryIndexRoute,
   FormdataRedirectIndexRoute: FormdataRedirectIndexRoute,
   MiddlewareIndexRoute: MiddlewareIndexRoute,
   PrimitivesIndexRoute: PrimitivesIndexRoute,
+  RedirectTestIndexRoute: RedirectTestIndexRoute,
   FormdataRedirectTargetNameRoute: FormdataRedirectTargetNameRoute,
 }
 export const routeTree = rootRouteImport
diff --git a/e2e/react-start/server-functions/src/routes/redirect-test/index.tsx b/e2e/react-start/server-functions/src/routes/redirect-test/index.tsx
new file mode 100644
index 0000000000..6e3fd660aa
--- /dev/null
+++ b/e2e/react-start/server-functions/src/routes/redirect-test/index.tsx
@@ -0,0 +1,29 @@
+import { useQuery } from '@tanstack/react-query'
+import { createFileRoute, redirect } from '@tanstack/react-router'
+import { createServerFn, useServerFn } from '@tanstack/react-start'
+import { Suspense } from 'react'
+
+const $redirectServerFn = createServerFn({ method: 'GET' }).handler(async () => {
+  throw redirect({ to: '/redirect-test/target' })
+})
+
+export const Route = createFileRoute('/redirect-test/')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const redirectFn = useServerFn($redirectServerFn)
+  const query = useQuery({
+    queryKey: ['redirect-test'],
+    queryFn: () => redirectFn(),
+  })
+
+  return (
+    <div>
+      <h1 data-testid="redirect-source">Redirect Source</h1>
+      <Suspense>
+        <div>{JSON.stringify(query.data)}</div>
+      </Suspense>
+    </div>
+  )
+}
diff --git a/e2e/react-start/server-functions/src/routes/redirect-test/target.tsx b/e2e/react-start/server-functions/src/routes/redirect-test/target.tsx
new file mode 100644
index 0000000000..08d6a1cefc
--- /dev/null
+++ b/e2e/react-start/server-functions/src/routes/redirect-test/target.tsx
@@ -0,0 +1,14 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/redirect-test/target')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  return (
+    <div>
+      <h1 data-testid="redirect-target">Redirect Target</h1>
+      <p>Successfully redirected!</p>
+    </div>
+  )
+}
diff --git a/e2e/react-start/server-functions/tests/server-functions.spec.ts b/e2e/react-start/server-functions/tests/server-functions.spec.ts
index f67ad6c608..1f3f171b12 100644
--- a/e2e/react-start/server-functions/tests/server-functions.spec.ts
+++ b/e2e/react-start/server-functions/tests/server-functions.spec.ts
@@ -468,3 +468,12 @@ test('primitives', async ({ page }) => {
     await expect(page.getByTestId(`result-${suffix}`)).toContainText(expected)
   }
 })
+
+test('redirect in server function on direct navigation', async ({ page }) => {
+  // Test direct navigation to a route with a server function that redirects
+  await page.goto('/redirect-test')
+
+  // Should redirect to target page
+  await expect(page.getByTestId('redirect-target')).toBeVisible()
+  expect(page.url()).toContain('/redirect-test/target')
+})
diff --git a/e2e/solid-start/server-functions/src/routeTree.gen.ts b/e2e/solid-start/server-functions/src/routeTree.gen.ts
index 977f8bcec4..6668a59e02 100644
--- a/e2e/solid-start/server-functions/src/routeTree.gen.ts
+++ b/e2e/solid-start/server-functions/src/routeTree.gen.ts
@@ -22,11 +22,13 @@ import { Route as DeadCodePreserveRouteImport } from './routes/dead-code-preserv
 import { Route as ConsistentRouteImport } from './routes/consistent'
 import { Route as AbortSignalRouteImport } from './routes/abort-signal'
 import { Route as IndexRouteImport } from './routes/index'
+import { Route as RedirectTestIndexRouteImport } from './routes/redirect-test/index'
 import { Route as PrimitivesIndexRouteImport } from './routes/primitives/index'
 import { Route as MiddlewareIndexRouteImport } from './routes/middleware/index'
 import { Route as FormdataRedirectIndexRouteImport } from './routes/formdata-redirect/index'
 import { Route as FactoryIndexRouteImport } from './routes/factory/index'
 import { Route as CookiesIndexRouteImport } from './routes/cookies/index'
+import { Route as RedirectTestTargetRouteImport } from './routes/redirect-test/target'
 import { Route as MiddlewareSendServerFnRouteImport } from './routes/middleware/send-serverFn'
 import { Route as MiddlewareRequestMiddlewareRouteImport } from './routes/middleware/request-middleware'
 import { Route as MiddlewareClientMiddlewareRouterRouteImport } from './routes/middleware/client-middleware-router'
@@ -98,6 +100,11 @@ const IndexRoute = IndexRouteImport.update({
   path: '/',
   getParentRoute: () => rootRouteImport,
 } as any)
+const RedirectTestIndexRoute = RedirectTestIndexRouteImport.update({
+  id: '/redirect-test/',
+  path: '/redirect-test/',
+  getParentRoute: () => rootRouteImport,
+} as any)
 const PrimitivesIndexRoute = PrimitivesIndexRouteImport.update({
   id: '/primitives/',
   path: '/primitives/',
@@ -123,6 +130,11 @@ const CookiesIndexRoute = CookiesIndexRouteImport.update({
   path: '/cookies/',
   getParentRoute: () => rootRouteImport,
 } as any)
+const RedirectTestTargetRoute = RedirectTestTargetRouteImport.update({
+  id: '/redirect-test/target',
+  path: '/redirect-test/target',
+  getParentRoute: () => rootRouteImport,
+} as any)
 const MiddlewareSendServerFnRoute = MiddlewareSendServerFnRouteImport.update({
   id: '/middleware/send-serverFn',
   path: '/middleware/send-serverFn',
@@ -170,11 +182,13 @@ export interface FileRoutesByFullPath {
   '/middleware/client-middleware-router': typeof MiddlewareClientMiddlewareRouterRoute
   '/middleware/request-middleware': typeof MiddlewareRequestMiddlewareRoute
   '/middleware/send-serverFn': typeof MiddlewareSendServerFnRoute
+  '/redirect-test/target': typeof RedirectTestTargetRoute
   '/cookies': typeof CookiesIndexRoute
   '/factory': typeof FactoryIndexRoute
   '/formdata-redirect': typeof FormdataRedirectIndexRoute
   '/middleware': typeof MiddlewareIndexRoute
   '/primitives': typeof PrimitivesIndexRoute
+  '/redirect-test': typeof RedirectTestIndexRoute
   '/formdata-redirect/target/$name': typeof FormdataRedirectTargetNameRoute
 }
 export interface FileRoutesByTo {
@@ -195,11 +209,13 @@ export interface FileRoutesByTo {
   '/middleware/client-middleware-router': typeof MiddlewareClientMiddlewareRouterRoute
   '/middleware/request-middleware': typeof MiddlewareRequestMiddlewareRoute
   '/middleware/send-serverFn': typeof MiddlewareSendServerFnRoute
+  '/redirect-test/target': typeof RedirectTestTargetRoute
   '/cookies': typeof CookiesIndexRoute
   '/factory': typeof FactoryIndexRoute
   '/formdata-redirect': typeof FormdataRedirectIndexRoute
   '/middleware': typeof MiddlewareIndexRoute
   '/primitives': typeof PrimitivesIndexRoute
+  '/redirect-test': typeof RedirectTestIndexRoute
   '/formdata-redirect/target/$name': typeof FormdataRedirectTargetNameRoute
 }
 export interface FileRoutesById {
@@ -221,11 +237,13 @@ export interface FileRoutesById {
   '/middleware/client-middleware-router': typeof MiddlewareClientMiddlewareRouterRoute
   '/middleware/request-middleware': typeof MiddlewareRequestMiddlewareRoute
   '/middleware/send-serverFn': typeof MiddlewareSendServerFnRoute
+  '/redirect-test/target': typeof RedirectTestTargetRoute
   '/cookies/': typeof CookiesIndexRoute
   '/factory/': typeof FactoryIndexRoute
   '/formdata-redirect/': typeof FormdataRedirectIndexRoute
   '/middleware/': typeof MiddlewareIndexRoute
   '/primitives/': typeof PrimitivesIndexRoute
+  '/redirect-test/': typeof RedirectTestIndexRoute
   '/formdata-redirect/target/$name': typeof FormdataRedirectTargetNameRoute
 }
 export interface FileRouteTypes {
@@ -248,11 +266,13 @@ export interface FileRouteTypes {
     | '/middleware/client-middleware-router'
     | '/middleware/request-middleware'
     | '/middleware/send-serverFn'
+    | '/redirect-test/target'
     | '/cookies'
     | '/factory'
     | '/formdata-redirect'
     | '/middleware'
     | '/primitives'
+    | '/redirect-test'
     | '/formdata-redirect/target/$name'
   fileRoutesByTo: FileRoutesByTo
   to:
@@ -273,11 +293,13 @@ export interface FileRouteTypes {
     | '/middleware/client-middleware-router'
     | '/middleware/request-middleware'
     | '/middleware/send-serverFn'
+    | '/redirect-test/target'
     | '/cookies'
     | '/factory'
     | '/formdata-redirect'
     | '/middleware'
     | '/primitives'
+    | '/redirect-test'
     | '/formdata-redirect/target/$name'
   id:
     | '__root__'
@@ -298,11 +320,13 @@ export interface FileRouteTypes {
     | '/middleware/client-middleware-router'
     | '/middleware/request-middleware'
     | '/middleware/send-serverFn'
+    | '/redirect-test/target'
     | '/cookies/'
     | '/factory/'
     | '/formdata-redirect/'
     | '/middleware/'
     | '/primitives/'
+    | '/redirect-test/'
     | '/formdata-redirect/target/$name'
   fileRoutesById: FileRoutesById
 }
@@ -324,11 +348,13 @@ export interface RootRouteChildren {
   MiddlewareClientMiddlewareRouterRoute: typeof MiddlewareClientMiddlewareRouterRoute
   MiddlewareRequestMiddlewareRoute: typeof MiddlewareRequestMiddlewareRoute
   MiddlewareSendServerFnRoute: typeof MiddlewareSendServerFnRoute
+  RedirectTestTargetRoute: typeof RedirectTestTargetRoute
   CookiesIndexRoute: typeof CookiesIndexRoute
   FactoryIndexRoute: typeof FactoryIndexRoute
   FormdataRedirectIndexRoute: typeof FormdataRedirectIndexRoute
   MiddlewareIndexRoute: typeof MiddlewareIndexRoute
   PrimitivesIndexRoute: typeof PrimitivesIndexRoute
+  RedirectTestIndexRoute: typeof RedirectTestIndexRoute
   FormdataRedirectTargetNameRoute: typeof FormdataRedirectTargetNameRoute
 }
 
@@ -425,6 +451,13 @@ declare module '@tanstack/solid-router' {
       preLoaderRoute: typeof IndexRouteImport
       parentRoute: typeof rootRouteImport
     }
+    '/redirect-test/': {
+      id: '/redirect-test/'
+      path: '/redirect-test'
+      fullPath: '/redirect-test'
+      preLoaderRoute: typeof RedirectTestIndexRouteImport
+      parentRoute: typeof rootRouteImport
+    }
     '/primitives/': {
       id: '/primitives/'
       path: '/primitives'
@@ -460,6 +493,13 @@ declare module '@tanstack/solid-router' {
       preLoaderRoute: typeof CookiesIndexRouteImport
       parentRoute: typeof rootRouteImport
     }
+    '/redirect-test/target': {
+      id: '/redirect-test/target'
+      path: '/redirect-test/target'
+      fullPath: '/redirect-test/target'
+      preLoaderRoute: typeof RedirectTestTargetRouteImport
+      parentRoute: typeof rootRouteImport
+    }
     '/middleware/send-serverFn': {
       id: '/middleware/send-serverFn'
       path: '/middleware/send-serverFn'
@@ -516,11 +556,13 @@ const rootRouteChildren: RootRouteChildren = {
   MiddlewareClientMiddlewareRouterRoute: MiddlewareClientMiddlewareRouterRoute,
   MiddlewareRequestMiddlewareRoute: MiddlewareRequestMiddlewareRoute,
   MiddlewareSendServerFnRoute: MiddlewareSendServerFnRoute,
+  RedirectTestTargetRoute: RedirectTestTargetRoute,
   CookiesIndexRoute: CookiesIndexRoute,
   FactoryIndexRoute: FactoryIndexRoute,
   FormdataRedirectIndexRoute: FormdataRedirectIndexRoute,
   MiddlewareIndexRoute: MiddlewareIndexRoute,
   PrimitivesIndexRoute: PrimitivesIndexRoute,
+  RedirectTestIndexRoute: RedirectTestIndexRoute,
   FormdataRedirectTargetNameRoute: FormdataRedirectTargetNameRoute,
 }
 export const routeTree = rootRouteImport
diff --git a/e2e/solid-start/server-functions/src/routes/redirect-test/index.tsx b/e2e/solid-start/server-functions/src/routes/redirect-test/index.tsx
new file mode 100644
index 0000000000..42bf6b277d
--- /dev/null
+++ b/e2e/solid-start/server-functions/src/routes/redirect-test/index.tsx
@@ -0,0 +1,30 @@
+import { useQuery } from '@tanstack/solid-query'
+import { createFileRoute, redirect } from '@tanstack/solid-router'
+import { createServerFn, useServerFn } from '@tanstack/solid-start'
+import { Suspense } from 'solid-js'
+
+const $redirectServerFn = createServerFn({ method: 'GET' }).handler(async () => {
+  throw redirect({ to: '/redirect-test/target' })
+})
+
+export const Route = createFileRoute('/redirect-test/')({
+  component: RouteComponent,
+  ssr: 'data-only',
+})
+
+function RouteComponent() {
+  const redirectFn = useServerFn($redirectServerFn)
+  const query = useQuery(() => ({
+    queryKey: ['redirect-test'],
+    queryFn: () => redirectFn(),
+  }))
+
+  return (
+    <div>
+      <h1 data-testid="redirect-source">Redirect Source</h1>
+      <Suspense>
+        <div>{JSON.stringify(query.data)}</div>
+      </Suspense>
+    </div>
+  )
+}
diff --git a/e2e/solid-start/server-functions/src/routes/redirect-test/target.tsx b/e2e/solid-start/server-functions/src/routes/redirect-test/target.tsx
new file mode 100644
index 0000000000..4332687618
--- /dev/null
+++ b/e2e/solid-start/server-functions/src/routes/redirect-test/target.tsx
@@ -0,0 +1,14 @@
+import { createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/redirect-test/target')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  return (
+    <div>
+      <h1 data-testid="redirect-target">Redirect Target</h1>
+      <p>Successfully redirected!</p>
+    </div>
+  )
+}
diff --git a/e2e/solid-start/server-functions/tests/server-functions.spec.ts b/e2e/solid-start/server-functions/tests/server-functions.spec.ts
index 77e2aba862..2076b281eb 100644
--- a/e2e/solid-start/server-functions/tests/server-functions.spec.ts
+++ b/e2e/solid-start/server-functions/tests/server-functions.spec.ts
@@ -474,3 +474,12 @@ test('primitives', async ({ page }) => {
     await expect(page.getByTestId(`result-${suffix}`)).toContainText(expected)
   }
 })
+
+test('redirect in server function on direct navigation', async ({ page }) => {
+  // Test direct navigation to a route with a server function that redirects
+  await page.goto('/redirect-test')
+
+  // Should redirect to target page
+  await expect(page.getByTestId('redirect-target')).toBeVisible()
+  expect(page.url()).toContain('/redirect-test/target')
+})
