0

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?
2
  • 1
    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
    Commented Sep 22, 2011 at 22:43
  • As fas as your query is understood to me, you want "shop1.com" site to take user to "mydomain.com/shop/view/shop1" and this can be done by setting up redirect or domain forwarding from your domain provider. This option is available in Namecheap. Checkout if your domain provider is offering the same. Commented Dec 25, 2020 at 21:19

1 Answer 1

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.