// using DotNetNuke.Entities.Portals;
// using System.Collections;
PortalAliasController paController = new PortalAliasController();
PortalAliasCollection paCollection = portalControler.GetPortalAliasByPortalID(PortalId);
IDictionaryEnumerator hs = paCollection.GetEnumerator();
PortalAliasInfo paInfo = (PortalAliasInfo)hs.Entry.Value;
string PortalAlias = paInfo.HTTPAlias;
In most of the cases when you are in Module developement, and coding in Module control, you will directly get the HTTPAlias from PortalSetting.PortalAlias.HTTPAlias.
When you are coding in a DotNetNuke page, i.e. if you have inherited an aspx page from DotNetNuke.Framework.PageBase, at that time also you will get the same property as well.
But when you are in a parent portal and you want to do redirects to child portals, at that time you can use this code.
This code can be easily modified to get all the http alias of a portal.
Wish you all happy coding with DotNetNuke :)