redirect in next js code example
Example 1: javascript redirect
window.location.href = "http://mywebsite.com/home.html";
Example 2: js redirect
window.location.href = "https://your_website.php/page2.php;
// to remove actual address from the history:
window.location.replace = "https://your_website.php/page2.php;