Problems with Directories & URL's

Discussion in 'Hosting Services / Control Panel' started by WeWillFollow3, Jun 20, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I'm planning on having a number of domains situated off my main domain. So, for my domain www.abc.com I also want the following url's to point to the sub directories e.g.

    www.def.com -> www.abc.com/def
    www.ghi.com -> www.abc.com/ghi

    If i type in www.ghi.com/main.aspx I want it todefaulttowww.abc.com/ghi/main.aspx. In a nutshell, when on the website www.ghi.com I want to see no reference to www.abc.com in the paths? Any ideas? I'd also need a web.config file in each sub directory. Do I need to purchase domain pointers?

    Thanks in advance for your help.
     
  2. Takeshi Eto

    Takeshi Eto DiscountASP.NET Staff

  3. Thanks for that...i'm now getting a page with 'HTTP 403 Forbidden'. Is that because my sub domain facility hasn't been set up yet, i've already purchased the domain pointer for the address.
     
  4. My domain pointer is working fine now. The problem is I still have the directory name in the url. So, my index.aspx file says:

    Response.Redirect("/abc/main.aspx")

    When I go to the website, I get www.abc.com/abc/main.aspx when all I want it to say is www.abc.com/main.aspx. I know I can get rid of the 'abc' directoryby using a web.config file on the root. This entry gives me the desired:

    <add url="~/main.aspx" mappedUrl="~/abc/main.aspx"/>

    I have three problems with this:

    1. If I have two domains hosted, they can't both have a main.aspx.
    2. The webconfig is on the root, and therefore all my paths in my project would consist of ~/abc/...etc
    3. All the URL mappings for all my hosted domains would be in the one file.

    Can anyone help...this has had me baffled for some time!!!
     
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