I can't explain it but adding a trailing slash to the random link fixes the I'm feeling lucky result.
I think it has to do with how NextJS does its routing and how the server is set up. Without the trailing slash, the server first returns a redirect to /random/index.html, which then redirects to /search?q=undefined. I could be that the JS isn't initialised properly on /random/index.html so the URL randomiser doesn't resolve properly.
I can't explain it but adding a trailing slash to the random link fixes the I'm feeling lucky result.
I think it has to do with how NextJS does its routing and how the server is set up. Without the trailing slash, the server first returns a redirect to
/random/index.html
, which then redirects to/search?q=undefined
. I could be that the JS isn't initialised properly on/random/index.html
so the URL randomiser doesn't resolve properly.