Forum Discussion
dolly_pandit
Nimbostratus
Jun 09, 2020IRULE to redirect traffic from URL to another URL except for specific URI
HI Everyone, I am looking for an irule where any traffic from host abc.com should redirect to bbc.com expect when it has URI of /XYZ on host abc.com. I tried below irule but it is creating a ...
Samir
MVP
Jun 10, 2020You can try below irule. which will help to achieve your requirements.
when HTTP_REQUEST {
if { ([string tolower[HTTP::host]] equals "abc.com") and ([HTTP::uri] starts_with "/xyz") } {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
elseif {[string tolower[HTTP::host]] equals "abc.com")} {
HTTP::redirect "https://bbc.com"
}
}
Let us know if any issue.
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