Hosting only sub-directory advice


#1

how can i host a site that’s in a sub-directory on a domain on another host at dreamhost. so, outside of dreamhost is domain.com/site/ and i want to host /site/ at a domain on dreamhost and have it appear to reside at domain.com/site/ which is on another host… make any sense?


#2

I’m trying to wrap my brain around this. Ok so you have domain1.com/site/ right but you are actually hosted at domain2.com/site/ but you want it to appear that whatever information is on domain2.com/site/ is showing up on domain1.com/site/ right? You could use an iframe on domain1.com/site/ that loads the website at domain2.com/site/ (that’s how apps and such work on facebook). That will probably be the easiest way. I am sure you could use php to call information as well I am sure. I really don’t understand why you would want to do something like that if you have control over both websites (unless you don’t and you are wanting to hotlink to other people’s stuff for bandwidth stealing reasons).


#3

I don’t have control over both sites. The deal is I’m working on a site on another host and the people that control that don’t want to have anything to do with what I’m doing so I need to figure out a way to host the site that is in a subdirectory on another domain at my host. It’s very confusing and complicated to me because we’re not talking about standalone sites. They are in sub-directories. Also, could you explain how exactly this iframe thing would work?


#4

Uh…ok I’m still trying to picture this in my head. Lets say there is a site at domain1.com that you are a member of… and you (and others) are given space in a directory because you are affiliated so domain1.com/user but you can do pretty much whatever you want with the space yet it is unrelated to the content on domain1.com is that right? So what you want is to have someone know domain1.com/user but the website is actually at mydomain.com that is completely seperate? Why not save yourself some trouble and create an .htaccess file placed at domain1.com/user with 301 redirect rules in it. This way if someone types in domain1.com/user they will be sent to mydomain.com and you only have to worry about maintaining files on mydomain.com? As for information on iframes I’m not running an html basics course. Google is your friend.


#5

htaccess won’t work. (IIS) and the redirect isn’t an option, i have to maintain their existing URL. long story, but justified. the iframe thing seems workable except because this is a cross-domain thing i can’t extract the title tag from the iframe with js.