Forum Discussion
Srinivasa_Chala
Nimbostratus
Sep 16, 2018Please assist me in creating irule
Hi All,
I need help in creating irule as i am new to F5. Please find the requirement details below.
Solution requirement :
WebApplication running Hassle Free return application will make HT...
Stanislas_Piro2
Cumulonimbus
Sep 18, 2018Hi,
you can use following code (not tested)
It retrieve printer name, resolve printer address with DNS servers in pool p_dns, then define as
when HTTP_REQUEST {
if {[scan [HTTP::uri] {/%[^/]/%[^/]/} corpcode printername] == 2} {
set printer "${corpcode}-${printername}.lsapps.net"
HTTP::path [string map "/${corpcode}/${printername}/ /" [HTTP::path]]
foreach dns [active_members -list p_dns] {
Check if the first list element was empty
if {[set dest [lindex [RESOLV::lookup @[lindex $dns 0] -a $printer] 0]] ne ""} {
Set Node IP based on DNS resolution
node $dest 80
break
}
}
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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