I have a single Domain that I would like to share across two web applications. One Wordpress, the other Rails hosted on two separate servers. Specifically, I would like a handful of url resources processed by one server and not the other.

For example:

http://example.com/ -Wordpress
http://example.com/about -Wordpress
http://example.com/some-other-random-page -Wordpress
http://example.com/signup -Rails

Can this be done with a rewrite rule? Or would I need to set up a proxy server in front of both web applications?

link|improve this question
feedback

3 Answers

URL rewriting will not be enough in this case. You need to run a proxy in font of these two servers. This proxy can then (based on URL) forward each request to the appropriate server.

link|improve this answer
feedback

You can either set up a proxy server in front of both, or have one (say, for instance, the Wordpress server) proxy over to the other for the locations that it should handle.

For example:

<Location /signup>
    ProxyPass http://rails-server-name-or-ip/signup
    ProxyPassReverse http://rails-server-name-or-ip/signup
</Location>
link|improve this answer
This seems like the appropriate answer. I will talk with my hosting provider to see if I can make the changes. Thanks – Karl Jan 22 at 12:31
feedback

Just a thought, but your could point example.com to a generic isapi rewrite site, and then have the isapi change not only the URL, but also the port. This would be one way of getting around the need of a proxy. Then you just setup a port forward/NAT so that 80 goes to one server and 81 goes to another.

http://example.com/ -Wordpress http://example.com/about -Wordpress http://example.com/some-other-random-page -Wordpress http://example.com:81/signup -Rails

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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