toofat
Jan 02, 2020Nimbostratus
redirect based on user input urls
I want to redirect all *.web1.com address to *.web2.com for example, when user input abc.web1.com,it will be redirect to abc.web2.com input abcdef.web1.com will be redirect to abcdef.web2.com ...
- Jan 02, 2020
Hi toofat,
Can you try this iRule?
when HTTP_REQUEST { if { [HTTP::host] ends_with "web1.com" } { set newHost [string map {"web1.com" "web2.com"} [HTTP::host]] HTTP::redirect "https://$newHost[HTTP::uri]" } }