Root as a web application

Discussion in 'Getting started' started by purts, Apr 17, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. So I uploaded all my website's files/folders on the root (/) but apparently when I try to access www.MyDomainName.com it's still the DiscountASP panel. However, when I create a folder called Test, upload all my website to it, make it a Web Application and access www.MyDomainName.com/Test, it works.

    I want it to work directly on www.MyDomainName.com
     
  2. Takeshi Eto

    Takeshi Eto DiscountASP.NET Staff

    What is your default page filename? Most likely its being trumped by the DiscountASP.NET default page. You can remove the DiscountASP.NET default page from your root.
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    there should be a file named index.htm in the site root. remove that.
     
  4. For this you'll need to setup a redirect script. In IIS all startup page will begin in the root. If you want it to start in a subdirectory a redirect script will be the only way to achieve it. Try referring to this kb article on an example of setting up a redirect script.

    https://support.discountasp.net/KB/...omain-to-a-subdirectory.aspx?KBSearchID=29036

    This kb shows how to redirect subdomains to a subdirectory but you can also use it for just your domain name.
     
  5. So I should put this script in a index.htm (default)? I've tried but I think it's failing.

    Here's my index.htm:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-...
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <%
    If InStr( UCase(Request.ServerVariables("SERVER_NAME")),  UCase("epicerielauziere.com") ) > 0 Then
            Response.Redirect("/EL/Accueil.aspx")
    End If
    %>
    <title>Untitled Document</title>
    </head>
    
    <body>
    </body>
    </html>
     
  6. yeah that should work.
     
  7. Joseph Jun

    Joseph Jun DiscountASP.NET Staff

    If you've placed the code within an HTML file, the server-side code that you've specified will not work since the .htm/.html extensions aren't configured by default to be handled by one of the scripting engines.

    The easiest workaround would be to rename the file to either .asp or .aspx so that the code can be processed as a classic ASP application or an ASP.NET application and you'll need to make sure that the file name that you use is configured as a default document.
     
  8. Everything's working. Thanks for the help mods! Could you please delete this thread now? Thank you.
     
  9. mjp

    mjp

    We don't delete threads, since someone with a similar issue could be helped by reading them.
     
  10. I have the same problem

    I upload my web site and my database, but when i want to see I cant because I have the next message

    We're sorry, the web page you are trying to reach is unavailable.

    Please contact the website administrator.

    We apologize for the inconvenience.

    I have a file default.aspx, for the start page, when I type with this the mesagge is

    page not found

    please give me a solution
     
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