Forum Discussion
Nilendu_Haldar_
Nimbostratus
Jun 18, 2018Need iRule to redirect URL "'host+uri'/anything" to another "'host'/anything"
Please help. I am urgently looking for an iRule to redirect to .
Here "anything" means just anything. Example: Redirect to .....
Redirect to
- Stanislas_Piro2
Cumulonimbus
Hi,
you can use this code :
when HTTP_REQUEST { if {[HTTP::host] equals "www.abc.com"} { if {[scan [HTTP::uri] {/%[^/]%s} garbage new_uri] == 2} { HTTP::redirect ://www.xyz.com${new_uri} } else { HTTP::redirect ://www.xyz.com/ } } }
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