one site with multiple domain names

Discussion in 'DNS/Domain names' started by work2gs, May 2, 2011.

  1. Hi

    Can multiple domain names access same site ?
    like
    www.dn1.com redirect to ttp://www.dn1.com/main.aspx?id=1"
    www.dn2.com redirect to ttp://www.dn1.com/main.aspx?id=2"
    etc....
    could you provide the script ?

    thanks
    Joe
     
  2. Ray

    Ray

    I don't think this is going to work. You can probably set to open a different page such as main2.aspx but not opening the same page.
     
  3. mutliple domain name for same site

    Hi
    This is not the same page...id is changing ???
    did you mean that it's not possible to define mutliple domain name for a same site ?
    how to open main2.aspx ?
    Thanks
    Regards
    Joe
     
  4. Ray

    Ray

    What is the different ID suppose to do? So you want the ID to change but target the same web page? Is the visual format of the web page suppose to change to? Just exactly what are you trying to accomplish?
     
  5. content will be different

    with id the content will be different- i need to provide for my customers their specific informations .
    i can manage a different aspx as main1.aspx, main2.aspx.
    How I could find a sample script ?
    thanks
    Fred
     
  6. Ray

    Ray

    That sounds like a better way to do it I think. It's simpler and more efficient. If you have multiple users and you want them to have a custom web page to see then maybe that is the way to go. But since you only have two domain names maybe two different sites with different names maybe better. You can setup a redirect script to accomplish this.
     
  7. Hi Ray

    Thanks for your help.
    But unfortunately I cannot manage to write the script

    I try this but doesn't work, what's wrong ?

    thanks a lot
    Joe


    <%
    If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("DOMAINE_NAME1") ) > 0 Then
    Response.Redirect("http://www.DOMAINE_NAME1.com/Page.aspx?id=1")
    ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("DOMAIN_NAME2") ) > 0 Then
    Response.Redirect("http://www.DOMAINE_NAME1.com/Page.aspx?id=2")
    End If
    %>
     
  8. Ray

    Ray

    I don't think this is going to work.

    ("http://www.DOMAINE_NAME1.com/Page.aspx?id=1")

    ("http://www.DOMAINE_NAME1.com/Page.aspx?id=2")

    You may have to do it this way instead.

    ("http://www.DOMAINE_NAME1.com/Page1.aspx")

    ("http://www.DOMAINE_NAME1.com/Page2.aspx")
     
  9. Winhostdefault.htm or Winhostdefault.asp

    Hi

    What is the format and file name for Winhost ?
    is Winhostdefault.asp also is working ?

    <%@ LANGUAGE="VBSCRIPT" %>
    <%
    If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("dn1") ) > 0 Then
    Response.Redirect("http://www.dn.com/main1.aspx")
    ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("dn2") ) > 0 Then
    Response.Redirect("http://www.dn.com/main2.aspx")
    Else
    Response.Redirect("http://www.cnn.com")
    End If
    %>

    thanks
    Fred
     
    Last edited by a moderator: Oct 14, 2015
  10. Ray

    Ray

    Not sure what you mean? Any ASP file will be processed by the correct engine and run your redirect script.
     

Share This Page