Results 1 to 2 of 2
  1. #1
    Join Date
    May 2002
    Posts
    34

    Directing Domain name to subfolder of existing web?

    Not sure if this is possible or not but hopefully someone here will know. My website is being hosted on a Windows Server with IIS 5. We have a website that lives in a sub folder of our site. We have registered a new domain name for this mini website so it can be accessed directly.

    Let's called the main site www.xxxx.com and the newly registered name as www.yyyy.com. The mini web is located at www.xxxx.com/abcd. Ideally what we want to do is set something up so that when someone types in http://www.yyyy.com, they will be redirected to the files in www.xxxx.com/abcd but their address bar would STAY showing www.yyyy.com so it was transparent that they were really on our same primary site.

    Currently we have both sites pointing to the same IP address and have an ASP index file that reads where they are trying to go and directs xxxx.com to home.asp and yyyy.com to xxxx.com/abcd but it also then puts www.xxxx.com/abcd in the address bar. This is what we don't want to happen.

    Also when someone clicks a link within the yyyy site to go to www.yyyy.com/pagename.htm, it should redirect it to www.xxxx.com/abcd/pagename.htm but still show the yyy.com/pagename.htm in the address bar.

    Is there any way around this?

    Thanks.

  2. #2
    Hi kelemvor,

    If I'm understanding you right, then what I would do is:

    Set up two sites under IIS. One pointing to your main site directory and one pointing to the sub-directory. In the properties for the second site one the "Web Site" tab click the "Advanced" button. Now click add and add the domain you want to use (yyyy.com)

    With this set up the first IIS site will anwser to anything that is not yyyy.com and the second site will answer to yyyy.com.

    This is called name based hosting. You could try looking at http://www.iisfaq.com/default.aspx?View=P24&P=139 for more help.

    I hope this helps. (and you can understand it, I'm not to good at typing what I think. )

    -ADDED - As long as all your links in the files for yyyy.com are reletive (../ and page.htm) then the user will not know any diff'

    If I can help anymore let me know.

    Matthew.
    Last edited by iburst; 03-09-2004 at 10:50 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •