I am in the process of creating an index.html page that will automatically redirect to a specific page based on the month. This is specifically for my investment portfolio, where I track announcements like Ex-Dividend dates for companies I invest in. For example, if I want to see which companies have upcoming Ex-Dividend dates in April, I simply visit the index.html page and it will take me to the designated April page.
To get the code for the random redirect feature, I visited this website: ()
Below is the code provided by them:
<script type="text/javascript">
var urls = new Array();
urls[0] = "http://learninginhand.com";
urls[1] = "http://learninginhand.com/about";
urls[2] = "http://learninginhand.com/contact";
urls[4] = "http://learninginhand.com/services";
urls[5] = "http://learninginhand.com/videos";
urls[6] = "http://learninginhand.com/infographics";
urls[7] = "http://learninginhand.com/resources";
urls[8] = "http://learninginhand.com/stickaround";
urls[9] = "http://learninginhand.com/posts";
urls[10] = "http://learninginhand.com/pet";
var random = Math.floor(Math.random()*urls.length);
window.location = urls[random];
</script>