Forum Discussion
irules redirection and something extra
I have a requirement for creating an irule which will add the site id to the forwarded url on https The iRule should redirect requests for
cmsint-qa.abc.com/public/header.html?SiteId=GCR
To
https://gcr-qa.abc.com/public/header.html
If the rule can be written in such a way that the SiteId is added to "-qa.abc.com/public/header.html" with HTTPS
Any help would be appreciated
3 Replies
- Kevin_Stewart
Employee
How about something like this:
when HTTP_REQUEST { if { not ( [URI::query [string tolower [HTTP::uri]] siteid] equals "" ) } { set siteid [URI::query [string tolower [HTTP::uri]] siteid] HTTP::redirect "https://${siteid}-qa.abc.com/public/header.html" } } - F5Zan_89516
Nimbostratus
Thanks Kevin So this whole piece of code is forwarding the URL and adding the site id to the forwarded url header.html as well?
- Kevin_Stewart
Employee
If the request URI contains a "siteid" query string, it is redirected to the new URI.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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