Subdomain Redirecting Adds Folder Suffix?

Discussion in 'DNS/Domain names' started by Noah Crowley, May 12, 2014.

  1. Hello,

    I'm trying to add a subdomain to my website, and I got it working - sorta. You see, if you go to my subdomain, you'll see that the URL gets "/team" appended to it. This is far from a clean subdomain. I want it to simply be "team.theoremed.com", not with the "/team" at the end, to indicate the subdomain. How can I achieve this? Below are the contents of the default.aspx file that is in my website's root folder.

    <%
    If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("team.theoremed.com") ) > 0 Then
    Response.Redirect("/team")
    End If
    %>
     
  2. rum

    rum Winhost Staff

    You should be able to handle this using the IIS7 url rewrite module instead of using redirect script. To setup URL Rewrite rules you will need to connect to your site with IIS Manager. Please see this KB article for the instructions on how to connect to your site with IIS Manager:

    http://support.Winhost.com/KB/a628/using-the-microsoft-iis-70-manager.aspx

    Once you connected, navigate to the URL Rewrite section, Click Add Rule on the right hand side, Click the canonical domain name template.
     
    Last edited by a moderator: Oct 14, 2015
    ComputerMan and Michael like this.

Share This Page