johnt wrote
Is it possible to do it backwards ?
i.e. if we create parent portal on www.mydomain.com with name: www.name.com but dns is not settled yet, coud we add a new alias like www.mydomain.com/name and build it while it became available ?
Thanks
Yes, you can also do this backwards, but its a bit more work. You have to do 2 things: first create the proper http alias under site settings when logged on as host, and second: create a physical folder in the root of your dnn install with the name of your childportal (in your sample this would be "name"), and create a file named Default.aspx in that folder. The contents of that file should be this (just copy paste...):
<%@ Page language="VB" %>
<%@ Import Namespace="DotNetNuke" %>
<script runat="server">
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim DomainName As String
Dim ServerPath As String
Dim URL() As String
Dim intURL As Integer
' parse the Request URL into a Domain Name token
URL = Split(Request.Url.ToString(), "/")
For intURL = 2 To URL.GetUpperBound(0)
Select Case URL(intURL).ToLower
Case "admin", "desktopmodules", "mobilemodules", "premiummodules"
Exit For
Case Else
' check if filename
If InStr(1, URL(intURL), ".aspx") = 0 Then
DomainName = DomainName & IIf(DomainName <> "", "/", "") & URL(intURL)
Else
Exit For
End If
End Select
Next intURL
' format the Request.ApplicationPath
ServerPath = Request.ApplicationPath
If Mid(ServerPath, Len(ServerPath), 1) <> "/" Then
ServerPath = ServerPath & "/"
End If
DomainName = ServerPath & "Default.aspx?alias=" & DomainName
Response.Redirect(DomainName,True)
End Sub
</script>
HTH,
Cheers,
Erik