Forum Discussion
Leonardo_Souza
Jul 16, 2018Cirrocumulus
Have a look at this answer:
https://devcentral.f5.com/questions/uri-translation-vs-httpredirect-irule-52327
I modified your iRule, you will have to test:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/manual/" } {
HTTP::header replace "Host" "www.newsite.com"
set uri [string range [HTTP::uri] 8 end]
HTTP::uri "/support/txt/docs/$uri"
}
}
The logic is correct, but you had multiple syntax errors. Also, you need to send the remaining of the URI to the server.