Forum Discussion
Rahul_Gupt_2401
Nimbostratus
Oct 24, 2018Irule for a pega application
Hi, could someone please help me with an irule for below requirement:
We have 4 URL's : A, B, C and D
The VIP X needs to be configured with an irule such that whenever users hits the browser with URL A, irule captures the URL and execute the request with the URI "/prweb" added at the end of the link. For eg.
when HTTP_REQUEST_SEND { clientside { HTTP::header insert PegaRULES-SetContextURI ";
- Snl
Cirrostratus
try this (not tested)
when HTTP_REQUEST { if { [string tolower [HTTP::host]] ends_with "a.com" } { HTTP::header insert PegaRULES-SetContextURI https://a/prweb/ }{ HTTP::redirect "https://a.com/prweb[HTTP::uri]"} if { [string tolower [HTTP::host]] ends_with "b.com" } { HTTP::header insert PegaRULES-SetContextURI https://b/prweb/ }{ HTTP::redirect "https://b.com/prweb[HTTP::uri]"} if { [string tolower [HTTP::host]] ends_with "c.com" } { HTTP::header insert PegaRULES-SetContextURI https://c/prweb/ }{ HTTP::redirect "https://c.com/prweb[HTTP::uri]"} if { [string tolower [HTTP::host]] ends_with "d.com" } { HTTP::header insert PegaRULES-SetContextURI https://d/prweb/ }{ HTTP::redirect "https://d.com/prweb[HTTP::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