Forum Discussion
youssef1
Apr 04, 2018Cumulonimbus
Hello,
Firstof be carreful do not mix up hostname, URI and URL
URL: abc.ra.well.com/portallogon
URI: /portallogon
hostname: abc.ra.well.com
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
set uri [HTTP::uri]
if { [class match $host equals "host_datagroup"] and $uri equals "/" } {
set newuri [class match -value $host] equals host_datagroup]
HTTP::redirect "$newuri"
return
}
}
In your datagroup you will have something like that:
string: abc.ra.well.com
Value: /irj/portal
If user access with the following URL: https://abc.ra.well.com/ it will be redirect to https://abc.ra.well.com/irj/portal
I hope that's what you wanted. I did not test the irule. if you need other things light your need Regards.