Forum Discussion
Pandiarajan_701
Jun 26, 2012Nimbostratus
Irule Redirection
Dears,
I need to redirect an URL
www.bana.com/stp/* >>> www.gamil.com/*
We need to change the HTTP Host from "bana.com" to "gamil.com" and rem...
hooleylist
Jun 26, 2012Cirrostratus
Hi Pandiarajan,
You can try something like this:
when HTTP_REQUEST {
if {[string tolower [HTTP::host][HTTP::uri]] starts_with "www.bana.com/stp/"}{
log local0. "[IP::client_addr]:[TCP::client_port]: Redirecting request to http://gamil.com[string range 4 end [HTTP::uri]"
HTTP::redirect "http://gamil.com[string range 4 end [HTTP::uri]"
}
}
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects