Forum Discussion
Jim_107778
Nimbostratus
Oct 30, 2008Redirect and a comparison in one....
Hi...I'm new to iRules and have received a request to do the following in the same iRule:
1 redirect from one domain to another
and look for a query string...and if foun...
hwidjaja_37598
Altostratus
Oct 31, 2008Not sure whether it works. Give it a try:
when HTTP_REQUEST {
set newDomain "new.domain.com"
set newUri [HTTP::uri]
if { \
not ([HTTP::host] contains $newDomain) && \
$newUri contains "/page.asmx"} {
if {$newUri contains "?"} {
append newUri "&"
} else {
append newUri "?"
}
append newUri "cntgrp=Q"
HTTP::redirect "https://$newDomain$newUri"
}
}
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