Reputation: 43
I have an IIS server that is currently only accessible internally to our network and I would like to be able to access some files on it via a folder on our public website.
I would like it to work like the following:
user requests http://www.example-1.com/server2/[filename] from IIS server 1
Server 1 retrieves the file from the internal IIS server 2 at http://www.example2/[filename]
Server 1 IIS then sends the file to the user.
NOTE: User CANNOT access http://www.example-2.com/[filename] directly. Only the first IIS server has access.
Here is the steps I have taken to do this:
I am currently recieveing a 404 error when I try to access a file at: http://www.example-1.com/server2/test.jpg
I can verify the file is there by remoteing into web server one and browsing to: http://www.example-2/test.jpg This shows the test image.
I feel the problem must somehow be related to my URL rewrite rule.
If someone could offer advice on this issue I would greatly appreciate it as I have never used the URL Rewrite module before. Thank you!
Upvotes: 1
Views: 1104
Reputation: 43
I have found the solution!
I was very close but I made a key mistake...
Instead of using a Blank Rule I needed to use a "Reverse Proxy" rule in IIS 7 URL Rewriting.
I created this Reverse Proxy rule on the /server2/ folder.
This works perfectly!
Upvotes: 0