Forum Discussion
Poonam_Dronamra
Nimbostratus
Dec 06, 2006Irule Redirect Issue
I am trying to redirect the host portion to another URL
http://2007pece.mpiweb.org redirected to
http://www.mpiweb.org/cms/mpiweb/pece2007/pecetemplate.aspx?id=7390
and http:...
Dec 06, 2006
The most obvious question first: have you applied this iRule as a resource to the virtual server you are passing traffic through?
If you have, then next I would throw some logging in there to determine what the issue is. The code looks good to me.
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
log local0. "URI: '[HTTP::uri]'"
log local0. "Host: '[HTTP::host]', lc -- '$host'"
if {$host contains "2007pece"} {
log local0. "$host contains '2006pece'"
HTTP::redirect "http://www.mpiweb.org/cms/mpiweb/pece2007/pecetemplate.aspx?id=7390"
} elseif {$host contains "2007cmme"} {
log local0. "$host contains '2007cmme'"
HTTP::redirect "http://www.mpiweb.org/cms/mpiweb/cmme2007/cmmetemplate.aspx?id=7432"
} else {
log local0. "$host didn't match any filtering criteria"
}
}
Run a request through the Virtual with this iRule associated to it and take a look at the /var/log/ltm file. If you still can't figure out what's going on, pass the log output back here and I'll take a look.
-Joe
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