URL Rewrite - No redirection
A bit new to processing the irules and have a question which I hope the group can asisst with.
Scenario: User URL: http://site.company.com/study1
F5 will rewrite the URL -> /ServiceStudyDB to the server.
Return traffic from the Server will then need to be rewritten back to /study1 for the client. Using the below config, appears to be a redirect loop.
when HTTP_REQUEST { Disable the stream filter for client requests if {[HTTP::uri] contains "/study1"}{ HTTP::uri "/ServiceStudyDB" HTTP::header replace Accept-Encoding [string map -nocase {"" "none"} [HTTP::header Accept-Encoding]] STREAM::disable } } when HTTP_RESPONSE { if {[HTTP::header value Server] contains "IIS"}{ set study1_uri [string map -nocase {"/ServiceStudyDB" "/study1"} [HTTP::header "Location"]] HTTP::header replace Location $study1_uri } }
The reason for keeping the /studyx is that we will eventually be honing in on this to make sure this gets routed to a specific backend node.