Forum Discussion
Albert__Tase_70
Nimbostratus
Apr 19, 2007need help with persistance and redirects
ok I have two vips which are 170.224.107.69_80 and 170.224.107.69_https
in the pool for 80 I have 10.245.243.19 on 80
and 10.254.243.27 on 80
under the vip for 443 I have the default cert applied and
in the pool 10.254.243.19 on 80 and 10.254.243.27 on 80
the traffic comes in hts the 80 vip the server dose a redirect to Redirect to http://170.224.107.69/BookStore/SecureCheckOut.do
so I tried applying the folowing irule to redirect it to https and I a musing cookie for persisteance.
when HTTP_REQUEST {
if { [HTTP::uri] contains "http://170.224.107.69/BookStore/SecureCheckOut.do"}{
HTTP::redirect "https://170.224.107.69/BookStore/SecureCheckOut.do"}
else {
use pool bookstore_10.254.243.41_80
}} which I applied to the port 80 vip it odse not work
the whole idea is to take the incomming port 80 connection persist it to one of the two servers and when they hit check out redierct them to https on the same server they cam e in on
thansk for any help also have a ticket open for this with support C347360
- Wes_98712
Nimbostratus
First the URI match in the first line won't work because you are trying to match the URI to the entire URL. Something as follows should work:when HTTP_REQUEST { if { [HTTP::uri] contains "/BookStore/SecureCheckOut.do" } { HTTP::redirect "https://170.224.107.69[HTTP::uri]" } else { pool bookstore_10.254.243.41_80 } }
when HTTP_REQUEST { set my_uri [HTTP::uri] if { $my_uri contains "/BookStore/SecureCheckOut.do" } { HTTP::redirect "https://170.224.107.69$my_uri" } else { pool bookstore_10.254.243.41_80 } }
- For an overview on URI parsing, check out my recent tech tip on that subject:
http://devcentral.f5.com/Default.aspx?tabid=63&articleType=ArticleView&articleId=18
- Wes_98712
Nimbostratus
That is a great article Joe, the problem I have is the search functions on the new devcentral site do not always work. Aside from that, the content coming through is awesome. Good work all.
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