Forum Discussion
Philip_IT_71995
Jun 28, 2012Nimbostratus
Redirect URL path to maintenance pool
I have an irule display problem (below iRule) for redirecting URL path to maintenance page's pool.
The request is that LTM need to redirect the URL path www.server.com/News/ to Maintenance ...
nitass
Jun 29, 2012Employee
so, url for image could be /News/images/logo.gif, shouldn't it?
the above irule should translate it to /images/logo.gif when sending to pool Pool_Maint.
[root@ve1024: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@ve1024:Active] config b pool Pool_Maint list
pool Pool_Maint {
members 200.200.200.101:80 {}
}
[root@ve1024:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/News/" } {
HTTP::uri "[string map {/News/ /} [HTTP::uri]]"
pool Pool_Maint
}
}
}
[root@ve1024:Active] config ssldump -Aed -nni 0.0 port 80
New TCP connection 1: 172.28.19.251(35181) <-> 172.28.19.79(80)
1340963247.2490 (0.0011) C>S
---------------------------------------------------------------
HEAD /News/images/logo.gif HTTP/1.1
User-Agent: curl/7.15.5 (i686-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(35181) <-> 200.200.200.101(80)
1340963247.2500 (0.0007) C>S
---------------------------------------------------------------
HEAD /images/logo.gif HTTP/1.1
User-Agent: curl/7.15.5 (i686-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: */*
---------------------------------------------------------------
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