Replies: 2 comments 3 replies
-
One hack that comes to mind: Move my Then, I could add a redirect in |
Beta Was this translation helpful? Give feedback.
2 replies
-
Hello. What you are suggesting (creating a folder for the home page) seems fine and should work. You could also check the request URL in the middleware to only trigger something on the correct URL but the middleware would still be called for every pages. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to make a
_middleware
only get called forpages/index
? It seems like I have to put_middleware.ts
in the rootpages
folder, but this makes it get called on every page hit, which I don't need.My use-case is simple; I'm just using it for redirecting for authenticated users to
/dashboard
when they visit/
.Beta Was this translation helpful? Give feedback.
All reactions