Anatolyint
Apr 08, 2021Nimbostratus
F5 IRULE Replace path with subdomain
Hello,
I need to make an irule to replace HTTP::path with Subdomain, like this:
http://domain.com/PATH/blahblah ===>> http://PATH.domain/blahblah
The path is dynamic,
I was trying to make something like this:
when HTTP_REQUEST {
if { [HTTP::host] contains "domain.com[HTTP::path][HTTP::uri]" } { HTTP::redirect "https://[HTTP::path].domain2.com/edocument[HTTP::uri]" }
}
Is is possible?
Thanks.