Jump to content

Is this possible??


kkwong00

Recommended Posts

I am helping a non-profit organization to maintain two websites

www.abc.org

www.xyz.org

 

The two websites were built by different people and they are hosted in two different servers.

 

Recently my director wants to combine the two websites into one and put the xyz website under the abc website, so the xyz is no longer a separate site by itself, but it is kind of a sub-site under abc, like www.abc.org/xyz

 

To reduce the complexity for being physically combine the two websites into a single one, I believe somehow there should be a way to link them up

www.abc.org/xyz -> www.xyz.org

 

I have tried different ways of redirection, but it seems they all change the url display on the browser to www.xyz.org after redirect.

 

My director is really keen to not have the www.xyz.org any more as xyz is now something belongs to abc

 

Is it possible to get www.abc.org/xyz link to www.xyz.org at the same time the url still reads www.abc.org/xyz?

Link to comment
Share on other sites

"Is it possible to get www.abc.org/xyz link to www.xyz.org at the same time the url still reads www.abc.org/xyz?"

 

Yes - depending on whether relative or static links are used in the xyz website.

 

 

Is the xyz website moved onto the abc server??

 

A proxy rewrite will get www.abc.org/xyz to link to www.xyz.org and have the url read www.abc.org/xyz

 

If you enable the mod_proxy module with apache, and put the following line on your www.abc.org server, in a htaccess file located at: /var/www/xyz

 

RewriteRule ^/(.*) http://www.xyz.org/$1 [P]

 

The [P] is to use mod_proxy.

As I said at the start - this depends on whether the website has relative or absolute links. e.g. <a href="http://www.xyz"> = absolute. <a href="page.html"> = relative

 

-steve

Link to comment
Share on other sites

Nope - with mod_proxy - they can be on different servers.

 

All that will happen is that www.abc.org/xyz  (with a simple htaccess file with the previous code) will "proxy" calls to www.xyz.com on the fly in the background. It will still resolve and call www.xyz.com under the covers, but it will still show www.abc.org/xyz/websiteon_xyz.html in the URL bar.

 

-steve

Link to comment
Share on other sites

That sounds cool, exactly what I am after

 

Do I need to enable the mod_proxy on both server?

I have tried the stuffs below on both server, but it doesn't seem working

 

<IfModule mod_proxy.c>
ProxyRequests On

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

ProxyVia On
</IfModule>

Link to comment
Share on other sites

You need to enable mod_proxy only on 1 server - the one were you are browsing www.abc.org/xyz

because you want www.abc.org to PROXY requests to www.xyz.org

 

As it is not working, I suggest you do not have mod_proxy or proxy_html modules enabled.

 

Keep googling, and trying different ways.

 

-steve

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.