URL Rewriting - Removing SubFolder Name

Last post 07-01-2009 4:17 AM by sajid_ali. 2 replies.

Sort Posts:

  • URL Rewriting - Removing SubFolder Name

    06-30-2009, 10:21 PM
    • Member
      84 point Member
    • MJB1980
    • Member since 04-05-2008, 3:06 AM
    • Nashville, TN.
    • Posts 122

    Hey guys and girls!

    As always, thank you in advance for any help that can be offered.

    I'm sure what I'm looking to do has been done before (I just haven't searched for the right keywords yet). I'm contimplating hosting several different websites through my one hosting account. My host requires me to use a Domain Pointer to point any registered domain to my little piece of the server. Then, hardcode a gateway in the root to redirect traffic based upon the request. This is working just fine. The issue I'm having is this.

    My primary domain is www.Domain1.com - and all the files for that site are located in a folder off the root called Domain1.

    The second domain is www.Domain2.com - and all the files for THAT site are located in a folder off the root called Domain2. (original, no?!)

    The redirect is working fine. When someone types in www.domain2.com it takes them to the right folder. The problem (as I see it anyway) is that the URL is displaying as: www.Domain1.com/Domain1/Default.aspx and/or www.Domain2.com/Domain2/Default.aspx

    Obviously, the /Domain1 and /Domain2 are the subfolders the redirect is being pointed to.

    So what I would like to do is somehow (possible???) remove the subfolder name out of the URL string - ie: www.Domain1.com/Domain1/Default.aspx = www.Domain1.com/Default.aspx

    Is this possible? It 'sounds' like it's possible.

    Also, even if this is possible, is this opening a larger issue for future development? Are there downsides to hosting multiple applications under one account? Is it more beneficial simply to open new accounts per application? Regardless, I'd like to find out if there is some code (perhaps even a sample) source that could get me in the right direction.

    Thanks in advance!

    Matt B.
    "Doing my best to learn and help others do the same!"
  • Re: URL Rewriting - Removing SubFolder Name

    07-01-2009, 3:52 AM
    Answer
    • Contributor
      5,710 point Contributor
    • integrasol
    • Member since 06-05-2009, 11:18 AM
    • Posts 1,071

    Quick question, have you seen this article on URL rewriting, and is this something that is possible for you? http://msdn.microsoft.com/en-us/library/ms972974.aspx

    Thanks

    Carsten

    Please mark this post as Answer if it is of help to you. :-)
  • Re: URL Rewriting - Removing SubFolder Name

    07-01-2009, 4:17 AM
    Answer
    • Member
      270 point Member
    • sajid_ali
    • Member since 06-25-2009, 3:10 AM
    • India
    • Posts 50
Page 1 of 1 (3 items)