To rewrite the URI in the request, you can use HTTP::uri "/new/uri". To rewrite the URI in a response header, you can use 'HTTP::header replace'. To replace content in the response payload, you can use a stream profile and STREAM::expression based iRule.
There are quite a few examples in this forum and the wiki pages for the various commands. If you have a more specific idea of what you want to rewrite and/or try something which doesn't work, reply here and we can give you more detailed suggestions.
HTTP::uri (
Click here)
HTTP::header (
Click here)
STREAM::expression (
Click here)
pool (
Click here)
Aaron