Redirecting to subdomain

Discussion in 'General troubleshooting' started by jay3dave, Feb 23, 2013.

  1. I have created a subdomain called as "labs" using the Winhost control panel.
    On checking my directory structure on server using Filezilla, I didnt see any folder under the root folder. Why is it so?

    So, I had to create a directory "lab" using Filezilla and placed index.php file and others in it.


    I have an index.aspx file, index.html and index.php file directly under my root. When I type my root adress it shows index.html file.
    How do I make index.aspx as the default file?
    In index.aspx file I have the following script (taken from : http://support.Winhost.com/KB/a649/how-to-redirect-a-subdomain-to-a-subdirectory.aspx)
    to redirect to the subdomain:

    <%
    If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("labs.jaydave.net") ) > 0 Then
    Response.Redirect("/labs/index.php")
    End If
    %>

    Even then, when I type labs.jaydave.net in browser, it doesnt show the index.php which is there within labs subdirectory.
    How do I do it?
     
    Last edited by a moderator: Oct 14, 2015
  2. Where you able to get your redirection script working?

    When I looked in your /labs directory I did not see an index.php, that file was located in the /labs/php/lab1 sub directory.


    You can control which files your hosting space recognizes as default documents and in which order or precedence by using IIS Manager and the Default Document module, the following Knowledge Base article will provide you with instructions on how to do this.

    http://support.Winhost.com/KB/a593/can-i-specify-the-default-document.aspx
     
    Last edited by a moderator: Oct 14, 2015

Share This Page