window location php code example Example: window.location javascript php window.location.href = 'https://stackoverflow.com';