Forum Discussion
Ted_Smith_11168
Nimbostratus
Dec 17, 2005Newbie needs help
I need help with a rule. I set some cookie values and compare them-this part is woking fine. If the cokkie check is valid, I then want to check the uri. If the uri starts with/contains agencyctr I want to re-write the uri and re-direct user to https://host/center/templates/welcome.cfm.
If it doesn't contain /agencyctr allow through to Shared pool.
If cookie check fails send back to original site
Please forgive me, I am by no means a coder. I'm sure it shows!!
when CLIENT_ACCEPTED {
set ckname aac1
set ckvalue [IP::client_addr]
set ckdomain .mydomain.com
}
when HTTP_REQUEST {
set uri [HTTP::uri]
set host [HTTP::host]
set new_uri /center/templates/welcome.cfm
set new_url $host$new_uri
if {[HTTP::cookie exists $ckname]} {
if { $uri != "agencyctr/welcom.cfm" } {
pool Shared
} else {
HTTP::redirect https://$new_url
}
} else {
HTTP::redirect "https://aac.mydomain.com$uri"
}
Thanks!!
- Ted_Smith_11168
Nimbostratus
Update: - Ted_Smith_11168
Nimbostratus
Thanks for the update on the variables. I thought I had to set them before using them later. Good to know.
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