Forum Discussion
Hien_Truong
May 05, 2021Cirrus
irule redirect all except some path.
Hi, i need to redirect all wildcard uri except some uri. The below irule is working with wildcard (else condition) but not working with others (if and elseif) condition. Please help to fix this issu...
- May 05, 2021
Hi Hien Truong,
when HTTP_REQUEST { if { [HTTP::host] equals "www.default.com" && not ([HTTP::uri] starts_with "/abc/def" || [HTTP::uri] starts_with "/xyz/w") } { HTTP::respond 301 Location "https://otherdomain.com/redirect_legacy[HTTP::uri]" return } }
May 05, 2021
Hi Hien Truong,
when HTTP_REQUEST {
if { [HTTP::host] equals "www.default.com" && not ([HTTP::uri] starts_with "/abc/def" || [HTTP::uri] starts_with "/xyz/w") } {
HTTP::respond 301 Location "https://otherdomain.com/redirect_legacy[HTTP::uri]"
return
}
}
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