Forum Discussion
Will_12716
Nimbostratus
17 years agoSite Redirect with Irule
We have a situation that requires us to redirect traffic to a different port than port 80.
For example, we need to take any requests to http://www.mysite.com and redirect to http://www....
brice
Nimbostratus
17 years agoI would try the following. You might want to think about redirecting from service.mysite.com to www.mysite.com/SHCM, and not service.mysite.com/SHCM, but I have created the rule so both host and uri are very portable. The key is using "contains" instead of "equals" I think. See below...
when HTTP_REQUEST {
set uri [HTTP::uri]
set host [HTTP::host]
if { [HTTP::host] contains "service.mysite.com" } {
set uri "SHCM"
}
HTTP::respond 301 Location "http://$host$uri"
}
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