Question

I have a server. Lets call it http://A.com I also have an 'Enjin' forum board. Lets call it http://A.B.com.

The server is useful for many scripts and functional components for the admins. The forum boards are for the community, but I can only add HTML modules to it. No custom scripting.

Currently, I have it set up to redirect the index of http://A.com to http://A.B.com using HTML redirection, and so those who navigate to the root of A.com will be sent to the forums.

I would like to make it so if you navigate to http://A.com, it'll show the contents of http://A.B.com. We once used an iFrame, but that had a detrimental affect on the forums, so currently we just redirect them. I've seen someone using the same system have a URL such as http://C.com/forums/viewforum/212877 showing the contents of http://C.B.com/forums/viewforum/212877

I assume mod_rewrite could be capable of this, but how exactly?

Was it helpful?

Solution

It sounds like you want to set up a reverse proxy wherein a client requests a page from http://A.com/ retrieves the page from http://A.B.com/ using HTTP, and then returns that content as it own response to the client.

See http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxyvia

"A reverse proxy is activated using the ProxyPass directive or the [P] flag to the RewriteRule directive. It is not necessary to turn ProxyRequests on in order to configure a reverse proxy."

You would need to check what happens regarding links on pages. If http://A.B.com/ uses absolute links then they will be to pages inside http://A.B.com/ . But relative links will still be under http://A.com/ .

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top