Forum Discussion
PowerShellDon_1
Nimbostratus
Apr 24, 2017iRule to redirect if querystring matches list
Hi
I have a request to redirect users to a different URL for matching parameters. For example;
Current URL: https://xxx.domain.com/Foo/Bar?aa=NNNNNNN
New URL: https://yyy.domain.com/?aa=NNN...
Samir_Jha_52506
Noctilucent
Apr 24, 2017Please validate below iRule. Hope it will work.
class redirectURIs {
NNN
AAA
BBB
}
when HTTP_REQUEST {
if { [matchclass [URI::query [HTTP::uri] aa] equals redirectURIs] } {
HTTP::respond 302 Location "https://yyy.domain.com/?aa=[URI::query [HTTP::uri] aa]"
}
}
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