Forum Discussion
URL_Rewrite iRule Help!
So I have the following iRule in place and and would like to modify it so I won't have hard coded values in there. I really don't want to create 50 irules with different pool member names. Is there an easier way maybe a some variable?
when CLIENT_ACCEPTED {
Save the name of the VS default pool
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
if {[string tolower [HTTP::uri]] starts_with "/cardonfile"} {
Update the location in the header, change SSL "Server" profiles and target the correct pool
HTTP::header replace Location "[HTTP::uri]"
SSL::session invalidate
set cmd "SSL::profile /Common/Test"
eval $cmd
pool **AIB_126_CardOnFile** <------------
SSL::renegotiate
} else {
pool $default_pool
}
}
1 Reply
- Stanislas_Piro2
Cumulonimbus
Hi,
First, please upload the irule with "Code" Format... it will be easier to read it. Each person who want to help you will loose 10 min to search where are comments, where ends a command and where start the next one. most of them will stop reading :)
Why do you change Server SSL profile? Why do you renegociate Client side SSL session?
the best way to define one irule for multiple VS is to use CardOnFile pool suffix for every pools.
Example:
default pool : AIB_126 Cardonfile pool : AIB_126_CardOnFile
in this case, use the command :
pool "[LB::server pool]_CardOnFile"
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