Proxy config problems

Nov 19, 2008 at 5:37 AM
Trying to have IIS act as a proxy for a webmail server with limited success.
It seems that subdirectories on the webmail server cannot be proxied.
That is, the html gets proxied to the browser, but the pictures and scripts that are in subdirectories on the webmail do not display or load.
Current config is very simple:
RewriteEngine On
RewriteRule /webmail(.*) http://internalserver/webmail$1 [P]
RewriteRule /webmail http://internalserver/webmail/ [P]
When connecting to webmail directly, the login form references for example an image source as "./img/logo.gif", but the browser does not receive the image, just the placeholder.

I tried RewriteRules for the various directories that are referenced but didn't change much. Even pointed /webmail at my ISP page, and only the html comes back.

Help?

Cameron.
Coordinator
Nov 19, 2008 at 1:08 PM
Hi Cameron,

I can probably help, but I need more information.  Pull up fiddler and record one connection and then report back to me about what URL the image is being requested on.

Thanks,
Nick
Nov 20, 2008 at 4:32 AM
No worries, got it working. Had to specify each sub dir in the rules. Strangely there is one js file that will not load, but the rest do. Will enquire with webmail makers. The request for the file gets no response from the webmail server when proxied, but responds when directly requested. Fiddler shows 0 as http code and 0 as body, with the line in red too.

What can I do to figure this one out? Without that one js file the webmail does not load.

Thanks,

Cameron

On 19/11/2008, at 11:08 PM, nberardi <notifications@codeplex.com> wrote:

From: nberardi

Hi Cameron,

I can probably help, but I need more information. Pull up fiddler and record one connection and then report back to me about what URL the image is being requested on.

Thanks,
Nick
Coordinator
Nov 20, 2008 at 1:31 PM
Hi Cameron,

I am glad you got it working for the most part, but you shouldn't have to specify the folders separately.  I don't know why the server wouldn't be responding with the correct JS file when hit.  The other thing you may want to try is the following:
  • Request the file internally.
  • Find the exact path.
  • Make a one off statement specifically for that JS file.
The other option is to just copy that file and host it in a known path, that you know will work, and serve it up from there.