#How to redirect to another website?
12 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
The next.config is a permanent redirect to a hardcoded URL, mine is dynamic.
The other solution requires javascript, ideally I want a solution that works with javascript disabled
Ok so @hollow tusk
I remember the nextjs team mentioning that router.push might work with js disabled (yes I know it needs a client components.. black magic what can you say)
Now I'm not sure
So give it a try
What's the error you get btw using redirect for an external url.. since redirect should just work default with an absolute url
I'll check it out, I forgot the error and moved on. I can update the thread tomorrow to get more data
Thanks!
you can use permanentRedirect
https://nextjs.org/docs/app/building-your-application/routing/redirecting#permanentredirect-function
permanentRedirect also accepts absolute URLs and can be used to redirect to external links.