Proxy

View: New views
2 Messages — Rating Filter:   Alert me  

Proxy

by Terry-102 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,

I'm trying to use the proxy setting as follows:
<rule>
            <from>^/(.*)</from>
            <to type="proxy">http://site1.example.com/$1</to>
        </rule>

In the browser the url: http://localhost:8080/ does a redirect to
http://site1.example.com/$1. and the browser address changes to
http://site1.example.com.

I'm not sure if I am using this correctly but I was expecting to
browser address to stay http://localhost:8080/ and the page at
http://site1.example.com to show.

Thanks,


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "UrlRewrite" group.
To post to this group, send email to urlrewrite@...
To unsubscribe from this group, send email to urlrewrite+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/urlrewrite?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Proxy

by Avlesh Singh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Proxy rewrite rules always work as you expect them to, Terry.
Response of the <to> url is copied into the original response stream. Along with that, most the response headers from the target stream are also copied into the response headers of the original response.

My guess, is that your target site is sending a HTTP 3XX status code in the response header. The UrlRewriteFilter is this case would pass the header as it is to your client. And when the client sees that header, it redirects.

Try manually copying the target url in a client (browser) and see if the request redirects. If it does, then my "guess" holds true and there is very little that you can do. If it does not, please revert back with more details.

Cheers
Avlesh

On Thu, Oct 1, 2009 at 10:01 AM, Terry <terry.warwar@...> wrote:

Hi,

I'm trying to use the proxy setting as follows:
<rule>
           <from>^/(.*)</from>
           <to type="proxy">http://site1.example.com/$1</to>
       </rule>

In the browser the url: http://localhost:8080/ does a redirect to
http://site1.example.com/$1. and the browser address changes to
http://site1.example.com.

I'm not sure if I am using this correctly but I was expecting to
browser address to stay http://localhost:8080/ and the page at
http://site1.example.com to show.

Thanks,





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "UrlRewrite" group.
To post to this group, send email to urlrewrite@...
To unsubscribe from this group, send email to urlrewrite+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/urlrewrite?hl=en
-~----------~----~----~----~------~----~------~--~---