Over time I've heard this request coming in several times, so this is the time to share my idea on how to make it happen. so far I've found this the easiest and quickest way. I'll talk about trade offs at the end.
This technique involves a couple of steps:
1. Add Content Editor Web part anywhere on your Portal home page, this web part will not be visible to end users, this is why placement does not matter.
2. Edit content of this Web Part through the HTML editor option available in the WP.
3. Paste the following script in there
<script type="text/javascript">
var start = document.cookie.indexOf( "MyPortalHome=" );
if (start < 0) {
document.cookie = "MyPortalHome=Something";
document.location.href="[my desired url]";
}</script>
4. Replace [my desired url] with the url of your alternative home page
5. Save you changes :-)
Lets see what the script does:
var start = document.cookie.indexOf( "MyPortalHome=" );
This way we are checking for existence of the "MyPortalHome" cookie by setting "start" variable to the index location of the "MyPortalHome" cookie.
if (start < 0) {
if the cookie exists "start" variable will be more than -1, it will represent the actual start position of the cookie, if it is -1 then the cookie does not exist, meaning this is the firsts time user clicked on the portal url within this browser session. if this is the case we will execute the code below.
document.cookie = "MyPortalHome=Something";We are setting the cookie
document.location.href="[my desired url]";
And redirecting users to the alternative Home Page.
If the cookie exists we are doing nothing. It will indicate that user got to this page before. T
he cookie will expire as soon as the user closes the browser, next time the user goes to the portal url the cookie will be set again and they will get redirected to the alt. home page.
Gotchas:
1. if the user opens a new tab in IE and goes to the portal home, the cookie will persist and they will not get redirected, only when the browser is closed the cookie will expire with the end of the session.
2. To set the cookie in the browser you will have to allow to execute the script, you can prevent this behavior by modifying your security settings for this zone, or add this site to a list of trusted sites.
Have fun