Forum Discussion
Seckin_149390
Nimbostratus
Hi All,
Thanks for you replies. I suspect from the internal server doing this redirection but i do not know exact reason.
I will check more detail and inform you.
Hi Kevin by the way, there is a redirection irule on VIP like ;
if [HTTP::uri] equals "/" do HTTP::redirect "/blabla"
Regards,
Kevin_Davies_33
Oct 20, 2017Nimbostratus
If that does not help you then you can try the following simplified code to solve your problem. This will ensure that all redirects relative. This takes http://mylocal.server.com/anyway?hello=1 and makes it /anyway?hello=1. This means it will not longer change the name of the server in the browser.
when HTTP_REQUEST {
if {[HTTP::status] eq 302} {
if {[HTTP::header Location] starts_with "http"} {
HTTP::header replace Location "/[getfield [HTTP::header Location] {/} 4]"
}
}
}