Subdomain setup

Discussion in 'Domain names/DNS' started by tjm6f4, Nov 19, 2015.

  1. After creating the subdomain on my site, I'm not quite sure which directory it points to.

    What are the next steps after creating the subdomain in cp.everleap.com?
     
  2. Martin Ortega

    Martin Ortega Everleap staff

    You point it to the subdirectory you want to point it to.

    To redirect subdomains or domain pointers to specific directories, we have some redirect information and sample code in our Knowledge Base, at: http://support.discountasp.net/KB/a369/how-to-redirect-a-subdomain-to-a-subdirectory.aspx.

    You can also the URL Rewrite to complete the redirect. http://stackoverflow.com/questions/16027389/iis-redirect-subdomain-to-subfolder-on-same-subdomain

    Or check this web page article out here: https://benpowell.org/winhost-com-how-to-really-run-multiple-sites-under-one-account/
     
    mjp likes this.
  3. I really like the setup described in the last link. Very simple and powerful. I'm a bit confused by one step: configure your “Application Starting Points”. How is this done in the Everleap cp.panel? My main site is working correctly and directing to /main but my subdomains are not. It seems that this step is likely what I'm missing.

    Also a tip to anyone else doing this: Each rule requires a unique NAME property or you get a duplicate KEY error.
     
    Last edited: Jan 9, 2016
  4. Takeshi

    Takeshi Everleap staff

    In the Everleap control panel you have the App Roots tool in the Site manager.
     
  5. Thanks! I had already done that, but wasn't sure that was what the blog was referencing. I did get some help with this, and was encouraged to modify by REWRITE rule for the subdomains as follows:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    <system.webServer>
    <rewrite>
    <rules>
    <rule name="SUBDOMAIN.PRIMARYSITE.com to sub folder" enabled="true" stopProcessing="true">
    <match url="(.*)" ignoreCase="true" />
    <conditions logicalGrouping="MatchAll">
    <add input="{HTTP_HOST}" pattern="^SUBDOMAIN\.PRIMARYSITE\.com$" ignoreCase="false" />
    <add input="{PATH_INFO}" pattern="^/SUB_FOLDER($|/)" negate="true" />
    </conditions>
    <action type="Rewrite" url="\SUBDOMAIN\{R:0}" />
    </rule>
    </rules>
    </rewrite>
    </system.webServer>
    </configuration>

    Seems to work. There's a bit more going on here then I understand yet, but I'll figure it out. Working examples really help.
     
  6. hi
    you have to redirect you subdomain to right place. You have to create folder for your subdomain. Public_html is for the main domain( the first you buy) you just add files to public_html and the rest of the you have to upload to new created folder.
     
  7. mjp

    mjp

    public_html is typically the home directory on a *nix/Apache server.

    At Everleap the site's home directory is: /site/wwwroot
     
    Ray Huang likes this.

Share This Page