Forum Discussion
MeAndMyBIGIP_60
Nimbostratus
Jun 21, 2010HTTP::URI redirect to another Pool
Trying to use the sample code here (http://devcentral.f5.com/wiki/default.aspx/iRules/HTTP__uri.html) to do something that should be very simple: when HTTP_REQUEST {
if { [HTTP::uri] ends...
nitass
Employee
Oct 31, 2012are you looking for rewriting or redirection?
What Is the Difference Between URL Rewrite and Redirect?
http://computer.yourdictionary.com/articles/what-is-the-difference-between-url-rewrite-and-redirect.html
this is an example of rewriting.
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.79:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b pool foo list
pool foo {
members 200.200.200.101:9200 {}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if { [HTTP::path] equals "/" } {
pool foo
HTTP::uri "/psp/maps/local"
}
}
}
[root@ve10:Active] config ssldump -Aed -nni 0.0 port 80 or port 9200
New TCP connection 1: 172.28.20.11(59720) <-> 172.28.19.79(80)
1351654379.4628 (0.0012) C>S
---------------------------------------------------------------
HEAD / HTTP/1.1
User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: 172.28.19.79
Accept: */*
---------------------------------------------------------------
New TCP connection 2: 200.200.200.10(59720) <-> 200.200.200.101(9200)
1351654379.4648 (0.0018) C>S
---------------------------------------------------------------
HEAD /psp/maps/local HTTP/1.1
User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: 172.28.19.79
Accept: */*
---------------------------------------------------------------
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