Redirect traffic from Subfolder to different Webserver

Posted on 2007-10-16
Last Modified: 2012-06-22
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!
Question by:tobiasroedig

    Expert Comment

    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


    Author Comment

    But then the address would change to http://webserver2/index.php?title=... but it should be http://webserver1/wiki/index.php?title=...
    LVL 15

    Accepted Solution

    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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    Title # Comments Views Activity
    IIS Issue 7 74
    IIS7 FTP default folder 8 42
    Automatic Image Uploading 9 48
    Best free website shortner services 2 50
    Introduction HyperText Transfer Protocol ( or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
    Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
    Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
    Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now