Forum Discussion
Piergiorgio_Pas
Nimbostratus
Aug 26, 2016Manipulate Uri for Rewrite
Hi
I have to manipulate this type of call www.something.it/site/one/two/three
to make it this way www.something.it/site?AAA=one?BBB=two?CCC=three
After the word site the other fields are tr...
Stanislas_Piro2
Cumulonimbus
Aug 26, 2016Hi,
you can try this irule:
when HTTP_REQUEST {
if {[regexp {^(.*\/site)\/(.*)$} [HTTP::path] fulllpath baseurl myfields]} {
set fields [split $myfields "/"]
set query ""
foreach field $fields param {AAA BBB CCC DDD EEE FFF GGG HHH III JJJ KKK LLL MMM NNN OOO} {
if {$field == ""} {break}
append query "$param=$field&"
}
set query [string trimright $query "&"]
HTTP::uri "$baseurl?$query"
}
}
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