Forum Discussion
Beinhard_8950
Nov 22, 2011Nimbostratus
Redirect based on URL, Cookie problem.
Hi,
I have a VS that has it´s default pool.
The VS has cookie insert has persistence.
I have made a "redirection" based on a Uri with this Irule.
when HTTP_REQUEST {...
nitass
Nov 22, 2011Employee
e.g.
[root@ve1023:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.79:80
ip protocol 6
rules myrule
persist cookie
profiles {
http {}
tcp {}
}
}
[root@ve1023:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if {[HTTP::uri] equals "/test"}{
pool foo2
} else {
pool foo
}
}
}
[root@ve1023:Active] config curl -I http://172.28.19.79/
HTTP/1.1 200 OK
Date: Tue, 22 Nov 2011 16:32:10 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Fri, 11 Nov 2011 14:48:14 GMT
ETag: "4183e4-3e-9c564780"
Accept-Ranges: bytes
Content-Length: 62
Connection: close
Content-Type: text/html; charset=UTF-8
Set-Cookie: BIGipServerfoo=1707657416.20480.0000; path=/ <<<<<<<<<<
[root@ve1023:Active] config curl -I http://172.28.19.79/test
HTTP/1.1 404 Not Found
Date: Tue, 22 Nov 2011 16:31:31 GMT
Server: Apache/2.2.3 (CentOS)
Connection: close
Content-Type: text/html; charset=iso-8859-1
Set-Cookie: BIGipServerfoo2=1724434632.20480.0000; path=/ <<<<<<<<<<
[root@ve1023:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if {[HTTP::uri] equals "/test"}{
persist none <<<<<<<<<<
pool foo2
} else {
pool foo
}
}
}
[root@ve1023:Active] config curl -I http://172.28.19.79/
HTTP/1.1 200 OK
Date: Tue, 22 Nov 2011 16:33:06 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Fri, 11 Nov 2011 14:48:14 GMT
ETag: "4183e4-3e-9c564780"
Accept-Ranges: bytes
Content-Length: 62
Connection: close
Content-Type: text/html; charset=UTF-8
Set-Cookie: BIGipServerfoo=1707657416.20480.0000; path=/
[root@ve1023:Active] config curl -I http://172.28.19.79/test
HTTP/1.1 404 Not Found
Date: Tue, 22 Nov 2011 16:32:17 GMT
Server: Apache/2.2.3 (CentOS)
Connection: close
Content-Type: text/html; charset=iso-8859-1
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