-1

I have a code to redirect website to one page http://website1.com

I want to make it redirect to multiple pages but randomly

http://website1.com
http://website2.com
http://website3.com

How can I create an automatic redirect with random URLs?

<script>
    
window.location.replace('http://website1.com'); 
    
</script>    
    

<script>
    
window.location.replace('http://website1.com'); 

</script>


<script>
    
window.location.replace('http://website1.com'); 
    
</script>
mplungjan
  • 169,008
  • 28
  • 173
  • 236
aboloza
  • 33
  • 3
  • I've no clue what you meant byu this *I want to make it redirect to multiple pages but randomly*. – Abdulla Nilam Aug 08 '23 at 05:22
  • Is the [tag:php] tag necessary for this question? – shingo Aug 08 '23 at 05:30
  • sorry by mistake – aboloza Aug 08 '23 at 05:32
  • Please visit [help], take [tour] to see what and [ask]. Do some research, search for related topics on SO; if you get stuck, post a [mcve] of your attempt, noting input and expected output, preferably in a [Stacksnippet](https://blog.stackoverflow.com/2014/09/introducing-runnable-javascript-css-and-html-code-snippets/) – mplungjan Aug 08 '23 at 05:36

0 Answers0