Here is a simple Razor script
@using DotNetNuke.Common
@using DotNetNuke.Entities.Profile
@using DotNetNuke.Entities.Portals
@using DotNetNuke.Entities.Users
@using DotNetNuke.Entities.Modules
@using System.Web
@if( @Dnn.User.Profile.GetPropertyValue("TestProperty") == "Hello" )
{
Response.Redirect("http://jncraig.us/test/Info.aspx");
}
else
{
Response.Redirect("http://jncraig.us/test/Weather.aspx");
}
This script checks a Profile Property named "TestProperty." If it has a value of "Hello" the the page redirects to one page. If not, it redirects to another page.
If I were doing this for real, I'd probably include an option to not redirect at all (say if TestProperty is null or an empty string). I'd probably also use the NavigateURL method available in DotNetNuke.Common. There are a number of different overloads that you can use to specify a page in the site. You can use other methods to get TabId from page name, etc.
Note that once you put this on a page, it will start redirecting. That might make it difficult to get to the page to edit the script. You can have another page with RazorHost and no active script to edit. Or, you could include a querystring variable which, if set, would skip the redirection.