Server response redirected to other port.

eveaevea Member
Our team is looking for an aflex code that can rewrite the server response.

We want to achieve in this aflex is to redirect first the traffic response from the server to 192.168.10.1:3013 for authentication login then after user successfully login redirect again to the other port 192.168.10.1:2011 which is the main dashboard of the user.

Note all of this application is reside only on one server.

We are trying this script but it is not working. Can someone tell me working script.

when HTTP_RESPONSE {
set VIPtest 192.168.8.103
# For all the redirects from the servers
if { [HTTP::is_redirect] } {
# Check if the location header contains ":8080"
if {(HTTP::host contains ":8080")} {
# Remove ":8080" from the Location header

HTTP::redirect "http://$VIPtest:8009"
}
}
}
Tagged:
Sign In or Register to comment.