Forum Discussion
Diego_23471
Nimbostratus
Nov 18, 2013uri redirects
Can anyone help me complement the irule below to redirect any url not mentioned here to a specific domain ?
For example, if user goes to http://mydomain1.org/page1 , it should send him to http:/...
Kevin_Stewart
Employee
Nov 18, 2013Try this:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] equals "/page1.html" } {
HTTP::redirect "http://mydomain2.org/page/page1.html"
} else {
HTTP::redirect "http://mydomain2.org"
}
}
Or
when HTTP_REQUEST {
switch [string tolower [HTTP::uri]] {
"/page1.html" {
HTTP::redirect "http://mydomain2.org/page/page1.html"
}
default {
HTTP::redirect "http://mydomain2.org"
}
}
}
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