KJ_50941
May 14, 2015Nimbostratus
Redirect Irule help
current irule for this app is as below. both test and test 2 resolves to 192.168.192.1=example.com when HTTP_REQUEST { if { [HTTP::uri] eq "/" } { HTTP::redirect https://[HTTP::host]/test } }
however if request comes to /test 2 should go to example.com/test2 and /test goes to examle.com/test.
will this works? Will below works?
when HTTP_REQUEST { if { [string tolower [HTTP::host]] eq "test" } { HTTP::redirect "https://example.com/[HTTP::uri]"
else
{ [string tolower [HTTP::host]] eq "test2" } { HTTP::redirect "https://example.com/[HTTP::uri]"
} }
thank you