Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

modify HTTP profile in iRule?

Is it possible to either change the HTTP Profile being used, or change the properties of the HTTP Profile for a connection using an iRule?  Based on scope, I'd expect this change to only be valid in events that execute prior to the HTTP_REQUEST, like CLIENT_ACCEPTED.


My goal is to use a different HTTP Profile based on the IP range a user comes from, rather than deploying multiple virtual servers with individual HTTP Profiles.  Currently, for each application we host one VS for LAN users, one VS for WAN users, and one VS for Internet users.  Obviously hosting 3 (or more based on some rumblings from specific WAN sites) VSes for one application should be unnecessary overhead.  By combining the VSes into one with some iRule logic, our time spent managing everything will be greatly reduced, including the use of geo-location for our internal/WAN DNS.
0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
You can't select an HTTP profile from an iRule, but you can configure a lot of the HTTP profile properties dynamically from an iRule. Can you give a bit more detail on what specifically you want to change from the iRule?

Aaron
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Specifically I would like to enable compression for one set of client IP's (users with a slow WAN link), but disable it for LAN users.
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Hi tarsier,

Modify the Compression Setting on the HTTP Profile to "Selective" and use the COMPRESS::enable inside of your iRule condition.

http://devcentral.f5.com/wiki/iRules.COMPRESS__enable.ashx
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Thank you, exactly what I needed!
0