Trouble with root pointers and hosting multiple sites in one account

Discussion in 'Hosting Services / Control Panel' started by richleah, Nov 17, 2008.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I have a page at the site rootcalled home.asp. That page has the following script in it:

    <%
    If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("sitea.com") ) > 0 Then
    Response.Redirect("/sitea")
    ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("siteb.com") ) > 0 Then
    Response.Redirect("/siteb")
    Else
    Response.Redirect("/sitea")
    End If
    %>


    The script is working great and redirecting to the appropriate subfolder. I have both subfolders marked as .net applications. The problem I am having is that when you go to either domain you also see the subfolder name in the url:

    www.sitea.com yeilds ==> www.sitea.com/sitea/default.aspx

    Basically, the application is looking back to the root folder as the application root instead of looking at the subfolder as the application root. Am I missing a setting in the web.config or something? I am not used to setting up application folders within application folders so this may be a knowledge gap for me. By the way, I do still have an application installed at the root folder level, but with the home.asp file redirecting, that application should not be working.

    Any help would be appreciated!!

    Richard
     
  2. The only way not to see the path is to do Url Rewriting.
    Go to Asp.net and search - there are several posts on this.


    Thank you,

    Spock

    Visual Studio 2005
    ASP.NET 2.0
    WinXP SP2
     
  3. Thanks so much for the help. I have been doing some research and was coming to that conclusion. Thanks again!!
     
  4. can anyone give some guidance or code examples on how we can do this on discountasp.net.
    THis is the last thing I'd like to get working.. [​IMG]
    I've been with DASP for 2 years and the service is great (plug [​IMG] )
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page