Forum Discussion

frank_30469's avatar
frank_30469
Icon for Nimbostratus rankNimbostratus
Feb 14, 2011

ProxyPass iRule uri rewriting in response

Hello,

 

 

I'm having the following problem.

 

I want to rewrite a url http://www.test1.com/yahoo to http://www.test2.com/my_yahoo

 

The problem is that on the response the uri (my_yahoo) everything is ok, but then the F5 is not rewriting the uri anymore.

 

 

So when a user browses to http://www.test1.com/yahoo, he sees http://test1.com/my_yahoo

 

 

I'm using ProxyPass version 10.3

 

 

The log output is in attachment.

 

 

Anyone any idea?

 

 

 

  • Hi Frank,

    Can you clarify what the issue is? Are requests being rewritten correct, but response content is not? If the issue is with response content being rewritten, can you uncomment this section which logs response content matches:

    
     Only uncomment this event if you need extra debugging for content rewriting.
     This event can only be uncommented if the iRule is used with a stream profile.
    when STREAM_MATCHED {
       if { $static::ProxyPassDebug } {
          log local0. "$log_prefix: Rewriting match: [STREAM::match]"
       }
    }
    

    Aaron
  • hoolio,

     

     

    the 2nd line (HTTP_RESPONSE) is correct, but the 3th line (HTTP_REQUEST) should also be yahoo instead of my_yahoo.

     

  • I uncommented those extra lines.

     

    As you can see, in the first responses, everything is ok, but on the following requests, the URI begins with my_yahoo.

     

    This should be yahoo

     

  • Can you use a browser plugin like HttpFox for Firefox or Fiddler2 for any browser to find where the /my_yahoo reference is coming from? Is it in the response content or a response header?

     

     

    Thanks, Aaron