Reputation: 71
We are hosting a .NET website on Windows Server 2008 R2 (IIS 7.5) www.ourwebsite.com (server 1). We are planning to have a blog on the website (www.ourwebsite.com/blog). However, this blog is going to be hosted on a linux server in wordpress (server 2). Now we are a bit confused trying to figure out how to redirect the user request of www.ourwebsite.com/blog from IIS 7.5 to the new server. Since every request of www.ourwebsite.com will always go to server 1. Our desire is that requests for "www.ourwebsite.com/blog" will go to server 2.
Any help in this regard would be really appreciated.
Farrukh
Upvotes: 4
Views: 3404
Reputation: 8814
There are two approaches that you can take from what you have described:
Create a virtual directory on server 1 "/blog" and configure the HTTP Redirect Module to send the client to server 2. You will want to configure this feature at the virtual directory level. The main drawback here is that the url that appears in the browser address bar will change to the redirected url. This would be the simpler option assuming that you are ok with the url changing. It also requires that server 2 is accessible on the network the same way server 1 is.
Use the URL Rewrite Module and the Application Request Routing Module together such that server 1 (IIS) acts as a reverse proxy sitting in front of your WordPress site. There is a tutorial which seems to address your situation (Tutorial Source). The benefit of this approach would be that the url does not change from "www.ourwebsite.com/blog" and it will redirect traffic relative to the path that is requested from the browser.
Upvotes: 4