Proxy command not working - 302 redirecting instead

Aug 31, 2010 at 2:59 PM

Hello,

I am trying to run one of the examples on a IIS7 both on my dev machine and on a win2008 server. I've changed the rules to:

RewriteEngine On
RewriteRule ^/(.*) http://gmail.com/$1 [NC,P]

 

hoping that the result is going to be a real proxy and not just a redirect but this is what I get - a mere 302 to the desired website. I couldn't build the source code so that I can debug what's going on on my dev machine due to cryptographic error so I am stuck atm.

What I need is a real reverse proxy for on of my websites.

 

Thanks.

 

Coordinator
Aug 31, 2010 at 9:49 PM

Hi Bogosian,

http://gmail.com redirects to http://mail.google.com so the proxy would duplicate that, try using a domain that doesn't redirect.  Try changing the domain to microsoft.com, twitter.com, or something that doesn't redirect.

Sep 1, 2010 at 6:28 PM

Ahh you are absolutely right and I am absolutely dumb :)

 

Indeed that was the case with gmail and also the other website I was using for tests was 302 redirecting from the bare http://the-url-here.com  to -> http://WWW.the-url-here.com ... 

 

cheers for your help and congrats on the excellent and highly useful component!