Forum Discussion
Joern_Oltmann
Nimbostratus
Mar 08, 2016Possible to put parameter from an URL into a cookie?
Hi, it is possible to search on an URL to one or more parameters, and when the parameters are found, set a cookie with the value of the parameter?
Thanks for answer.
Joern
Joern_Oltmann
Nimbostratus
Apr 11, 2016If anyone interested, I found the solution:
when HTTP_REQUEST {
set param_domain [domain [HTTP::host] 2]
set param_wlw_comid [URI::query [string tolower [HTTP::uri]] comid]
set param_wlw_cusid [URI::query [string tolower [HTTP::uri]] cusid]
}
when HTTP_RESPONSE {
if { ($param_wlw_comid ne "") and ($param_domain ne "") }{
HTTP::cookie insert name wlw_comid value $param_wlw_comid path "/" domain $param_domain
HTTP::cookie expires wlw_comid 31557600
}
if { $param_wlw_cusid ne "" and ($param_domain ne "") }{
HTTP::cookie insert name wlw_cusid value $param_wlw_cusid path "/" domain $param_domain
HTTP::cookie expires wlw_cusid 31557600
}
}
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