This is quite easy to do i hope you are talking about php because i wrote this in HTML with 2 php commands for my site a while ago bascially it detects when a user has logged in and redirects the user to a desired page or URL of your choice.
<!-- BEGIN switch_user_logged_out -->
<!-- Doorway Page generated by Title of your site -->
<HTML>
<Head>
<META name="Description" content=" ">
<META name="Keywords" content="">
<Title>Ecommerces.net</Title>
<SCRIPT LANGUAGE="Javascript">
browser= navigator.appName;
if (browser == "Netscape")
window.location="1stLink to desired Destination here"; else window.location="2ndLink to desired destination here"
</SCRIPT>
</Head>
<BODY>
<CENTER>
<!--TITLE OF YOUR SITE-->
<TABLE WIDTH="620">
<TR>
<TD ALIGN="CENTER">
<FONT FACE="Arial Black" COLOR="#808080" SIZE="+1">TITLE HERE OF YOUR SITE
</FONT></TD></TR></TABLE><P></P>
<TABLE WIDTH="620">
<TR><TD ALIGN="CENTER">
<FONT FACE="Arial" COLOR="#C0C0C0"><STRONG>
Javascript in Progress...</STRONG></FONT>
<FONT FACE="Arial" COLOR="#C0C0C0"><A HREF="The LINK TO THE PAGE YOU WANT TO DIRECT USERS TO">Click Here
</A> if you do not redirect in 5 seconds. You may not have a javascript enabled browser!</FONT></TD></TR></TABLE>
<P>
<BODY></HTML>
<!-- END switch_user_logged_in -->
I dont know if this is what your looking for but there u go
Regards jon
www.webdevs4u.com