Forum Discussion
HTTP redirect with different URIs
Hey Stanislas,
i like to comment your provided snippets...
1st snippet:
[HTTP::path] and [HTTP::query] seems to perform an ordinary [getfield [HTTP::uri] "?" (1|2)] in the background. In the end your snippet is splitting [HTTP::uri] two times followed by a substitution to produce a string comparable with [HTTP::uri] but seperated by a "&" sign (i dont understand the "&" sign at all, since the URL seperator between PATH and QUERY is always the "?" letter).
Then you use a [string map] on the substituted string to change the leading part. Well, [string map] is a very powerfull command to scan and replace (one or many) contents somewhere within string. But if the content to be replaced is at the beginning then [string range] in combination with subtitution does performance wise a somewhat better job.
2nd snippet:
Contains also a "&" sign as seperator between PATH and QUERY. See discription above.
Cheers, Kai
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