Forum Discussion

Michael_Omaljev's avatar
Michael_Omaljev
Icon for Nimbostratus rankNimbostratus
Dec 19, 2005

URI redirection question..

Currently I have an irule that sends all traffic for these URI's to one pool that has the equivilant directories on it.. Can the destination URI be changed to something different, or do the URI's have to be the same on the destination ?

 

 

 

example...

 

 

What if the directories on pool 'http_webserver1' was something different than /content, /clarica or /canada, let's say /claricasite, could /clarica be mapped to it in the irule?

 

 

 

 

 

when HTTP_REQUEST {

 

if { [HTTP::uri] starts_with "/content" or \

 

[HTTP::uri] starts_with "/canada" or \

 

[HTTP::uri] starts_with "/clarica" } {

 

pool http_clarica_80

 

} else {

 

pool http_webserver1

 

 

}

 

}

 

 

thanks !

2 Replies

  • If you want to do URI mapping, you can use the HTTP::uri command to do so. When used without any arguments, the command returns the existing URI value to be sent to the backend server. If given an argument in the clientside context (request), it will modify the existing URI value in HTTP request.

     

     

    Search the forums for HTTP::uri and rewrite for some pointers. I've also highlighted this on one of my blog posts:

     

     

    http://devcentral.f5.com/weblogs/joe/archive/2005/07/27/ModifyingUriWithoutRedirect.aspx

     

    Click here

     

     

    -Joe