Forum Discussion
leozh_54300
Nimbostratus
Jan 08, 2010HTTP::Redirect Question
I am trying to make an iRule that does an HTTP::Redirect as follows:
when HTTP_REQUEST {
if { [HTTP::host] equals"subdomain.xxxxx.com"} {
HTTP::redirect "http://subdomain.xxxxx.c...
hoolio
Cirrostratus
Jan 08, 2010You'll need to add a space between equals and "subdomain.xxx.com". And if this iRule is added to the HTTP virtual server, you might want to add a check for the path. Else I think you'll get an infinite loop of redirects to http://subdomain.xxxxx.com/parameter?yyyy=ZZ.
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] eq "subdomain.xxxxx.com" && [HTTP::path] eq "/"} {
HTTP::redirect "http://subdomain.xxxxx.com/parameter?yyyy=ZZ"
}
}
Aaron
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
