# Domain problem: viewing one site OFF another site?

I have this scenario:

• I have a domain, let's call it "mydomain.com".
• Mydomain.com runs various "sub-sites", e.g.: mydomain.com/shop/view/shop1, mydomain.com/shop/view/shop2, mydomain.com/shop/view/funkyShop etc

I want to be able to link other URLs to these subsites. For example, if you one of the subsites has the URL "shop1.com", I want to link that to my site. So, basically, if someone goes to shop1.com, it must open mydomain.com/shop/view/shop1. I know this can be done with parked domains and some coding or even a .htaccess file, but my scenario is furhter complicated.

There are cases where the user has a website on, e.g, shop1.com. They just want a subpath, e.g.: shop1.com/shop to point to mydomain.com/shop/view/shop1.

So my questions are:

1. Is this possible without parking the domain on my account?
2. Is the solution in the .htaccess file?
3. How can I make sure that if they open shop1.com/shop that it doesnt just redirect, but actually SHOWS THE CONTENT from my site on their site?
-

## migrated from stackoverflow.comSep 23 '11 at 18:02

This question came from our site for professional and enthusiast programmers.

since you don't want redirect do you mean loading their page asynchronously.Via ajax by updating the dom is ok, I had done some testing with loading js and css files on demand asynchronously and updating contents on some divs. It makes sense for some content but for a whole site I don't know if it is worth. In addition if the site you want to include has a smart and suitable design (mvc, predifined pieces in the controller to load parts of the site only) then you can load desired content without html, body tags etc. I have worked such things in a custom mvc. –  Melsi Sep 22 '11 at 22:43

One way to do this would be to use mod_proxy in apache.

On shop1.com, you could add a rule like the following to a .htaccess for shop1.com:

ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /shop http://mydomain.com/shop
ProxyPassReverse /shop http://mydomain.com/shop

-