Redirect traffic from Subfolder to different Webserver

We have two different webserver (webserver1 running Win2000 and webserver 2 running Ubuntu with apache2) which are both hosting a website. We would like to rewrite a subfolder on webserver 1 (webserver1/wiki/) to redirect all traffic to webserver2.
We tried to use ISAPI_Rewrite with the following code:
RewriteProxy wiki(.*) http\://webserver2$1

Unfortunately, the application running on webserver2 is using absolute paths for their links, so webserver1/wiki/index.php contains links like: /index.php?title=&
When clicking on such a link, the user receives a 404  FileNotFound as http://webserver1/index.php?title=... does not exist.
The thing we would need is either to insert /wiki in front of all these links or to make them relative. Any ideas?
What would be the best approach? Are there alternatives to ISAPI_Rewrite?
Thanks a lot!
Who is Participating?
on webserver1 (OS Win2K).  What is the webserver running on this machine?  IIS? or Apache.

If it is running some version of Apache, you could look at Apache reverse proxy implementation.

Specifically, look at ProxyPass and ProxyPassReverse directives.

For example, you need to load the proxy module, and add the following directives

ProxyPass                    /wiki     
ProxyPassReverse       /wiki     

Alternately, you could look at mod_rewrite to rewrite the URL.

With ProxyPass and mod_rewrite, the URL would not changed, so the client should stay at

If it's running IIS -- :( I am not that well verse with IIS.

Have you thought of using a redirect script on the default.htm or index.htm page in that folder that will redirect the client browser to the new location?

You can find an excellent redirect script at 

tobiasroedigAuthor Commented:
But then the address would change to http://webserver2/index.php?title=... but it should be http://webserver1/wiki/index.php?title=...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.