Skip to content

How to Redirect in getStaticProps #11346

Answered by aralroca
Kiarash-Z asked this question in Help
Discussion options

You must be logged in to vote

getStaticProps is not a middleware before rendering the page. Is executed on the build step. So I think that is not possible.

Replies: 7 comments 23 replies

Comment options

You must be logged in to vote
14 replies
@redreceipt
Comment options

@goranefbl
Comment options

@msafi
Comment options

@amritk
Comment options

@timfuhrmann
Comment options

Answer selected by Kiarash-Z
Comment options

You must be logged in to vote
5 replies
@aralroca
Comment options

@stormfar
Comment options

@MohammadPCh
Comment options

@AshConnolly
Comment options

@AshConnolly
Comment options

Comment options

You must be logged in to vote
1 reply
@brianlovin
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@timfuhrmann
Comment options

@noghartt
Comment options

@timfuhrmann
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet