Forum Discussion
Michael_Yates
Oct 14, 2011Nimbostratus
Hi jackster,
Try this:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/1" } {
HTTP::uri "/inside.corp.mycompany.com"
}
}
This will not change the URI in the browser. It will change the URI that is sent to the server.
The Browser will show: http://http://test.corp.mycompany.com/1
The Server will receive: http://test.corp.mycompany.com/inside.corp.mycompany.com
So you may want to analyze what you are wanting. You might want to change the the iRule to this:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/1" } {
HTTP::redirect "http://inside.corp.mycompany.com"
}
}
This will redirect you to a different website (http://inside.corp.mycompany.com).
Hope this helps.