You may also want to see:
There are already plenty of plugins that can handle redirect rules for you. You can also play around with your .htaccess for more advanced rules. Redirect URL to Post is a handy plugin that can redirect your visitors to a random post, your first or lasts post, and a combination of those conditions.
This plugin gives a link that takes users to a post on your website. The URL remains the same but its target changes depending on the conditions you set. For instance, you can use this plugin to create a link for random posts on your website.
You can use various parameters to limit the # of posts considered. This plugin also supports caching.
More WordPress reading: