Forum Discussion
Urv_165706
Nimbostratus
Aug 04, 2014Add http Header in URL incoming request
Hi all, I want set variable in Incoming URl request.
Example : If URL Includes /store/category/ then add "Location= category" in the Request.
Thanks
3 Replies
- Urv_165706
Nimbostratus
not sure it will work or not When HTTP_RESPONSE { If { ( [HTTP::URI] starts_with “/store/category/”) } { HTTP::header insert “location=category” } } - Kevin_Davies_40
Nacreous
if {[HTTP::uri] starts_with /store/} { if {[HTTP::query] eq ""} { set sep "?" } else { set sep "&" } HTTP::uri "[HTTP::uri]${sep}location=[getfield [HTTP::uri] {/} 3]" }/store/category/ becomes..
/store/category/?location=category
/store/joe/?value=2 becomes...
/store/joe/?value=2&location=joe
- Kevin_Davies_40
Nacreous
If this answer has help solve your problem, please tick the left of the post. Thanks.
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