Forum Discussion
Hien_Truong
Cirrus
Aug 31, 2020redirect some valid pages but set to reset or main page site with other garbage.
Hi, i need help with redirect irule: if user type the valid uri: https://mysite.com/work/validpage1 redirect to https://othersite.com/pages https://mysite.com/work/validpage2 redir...
Aug 31, 2020
Hi Hien Truong,
when HTTP_REQUEST {
set host [HTTP::host]
set uri [string tolower [HTTP::uri]]
}
when HTTP_RESPONSE {
if { $host eq "mysite.com" && $uri starts_with "/work/" } {
if { [HTTP::status] eq "200" } {
HTTP::redirect "https://othersite.com/pages"
}
else {
HTTP::redirect "https://mysite.com"
}
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
