Forum Discussion
Martin_Kaiser_1
Nimbostratus
Oct 20, 2005using getfield to split up URIs
Hi there,
can anyone of you show me the correct syntax for using the function getfield in an iRule?
What I want to do is split up an URI like "/webstart/portal/customer_id/some/more/fie...
Martin_Kaiser_1
Nimbostratus
Oct 24, 2005I just found the answer for myself:
when LB_FAILED {
set uri [HTTP::uri]
if {$uri contains "&view="} {
set regexp_result [regexp {view=([a-zA-Z]+)} $uri viewstring cust_id]
HTTP::redirect https://some.maintenancesite.com/$cust_id
}
}Thanks nevertheless!
Martin
PS: Is there any way to avoid using the variables $regexp_result and $viewstring in the above example? Those will never get used...
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
