My company currently has a single Windows based web server used to serve our main web site along with some .NET applications, which are in subdirectories.
We have just completed developing a new version of our main web site in Drupal. My boss doesn't want to install PHP on our current server.
We have the ability to create a virtualized web server where PHP can be installed and we can serve our main web site. We can make it LAMP or Windows. However my boss wants all of the .NET applications to remain on the current server.
How can I configure the virtualized server running the new main site to "push" requests for the subdirectories to the original server?
You'll probably want to use something like Apache's reverse proxy directives. May just be as easy as:
ProxyPass /foo/ http://www.windowsbox.com/foo/
ProxyPassReverse /foo/ http://www.windowsbox.com/foo/
This will redirect all requests to the /foo/ folder on your Apache server, over to the /foo/ folder on your Windows Box. Any links on pages on the Windows box will be rewritten to work properly as well.
You may also have to load all the proxy modules that are listed at the top of that page via
LoadModule
.--Christopher Karel
I use SQUID to transparently rewrite using a simple PERL script doing regex specified with redirect_program.
Other Web proxies support rewriting as well. Christopher Karel identified Apache's mod_proxy and Nginx supports it. In fact, I would be surprised if a Web proxy did not support rewriting.
Be certain to understand the distinction between rewrites and redirects: