Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have 2 websites, and we would like to be able to include the 2nd site as a part of our first site's URL path for SEO purposes. The example would be: Site 1 = www.domain1.com, Site 2 - www.domain2.com.

The end result is that we would like to setup the networking so that if a user navigates to www.domain1.com/domain2/ the URL would persist but show the content of the pages found @ www.domain2.com.

Is this possible, and if show can you describe how this would be done or point me to a URL that describes this procedure.

Why would we want to do this? the main domain we host internally with technology we are capable of supporting. the second domain is using technology we are not will/able to support internally and don't want to go through the cost to redevelop it. We want to leverage the content on the 2nd domain for SEO credit for the first domain.

Thank you.

share|improve this question
    
Which Webserver do you have ? Root-access to the server? –  zaub3r3r Nov 19 '10 at 22:00

1 Answer 1

You would typically do this by utilizing the reverse-proxy feature of your chosen web server. If you're using Apache, you probably want to read the documentation for mod_proxy:

You're particularly interested in the "ProxyPass" directive. With a typical Apache configuration, you could do what you want by adding something like this to the root of your virtual server configuration:

ProxyPass /domain2/ http://www.domain2.com/
ProxyPassReverse /domain2/ http://www.domain2.com/

Many web servers have similar functionality. There are also tools designed specifically for this sort of operation, such as Varnish (http://varnish-cache.org). This tutorial covers setting this up with Apache in more detail:

There are some caveats of which you should be aware: absolute links often need massaging in this sort of situation, because a link to /section/article.html on www.domain2.com needs to be /domain2/section/article.html on www.domain1.com. Depending on how your content is served up, you can fix this in your web server by filtering the content, or you can modify you content platform to generate appropriate links.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.