Forum Discussion
tvotta_94824
Nimbostratus
Oct 01, 2012Rewrite rule forward to specific domain and port
Hello Guys/Gals -- I'm new to irules and am trying to figure out a re-write scenario, I'm trying to change a current rule that does a redirect, and change it to rewrite. The current rule is lik...
nitass
Employee
Oct 01, 2012i assume foo is pool of server.nbc-news.west.foo.com and it is running http on port 7012.
e.g.
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.79:443
ip protocol 6
rules myrule
profiles {
clientssl {
clientside
}
http {}
tcp {}
}
}
[root@ve10:Active] config b pool foo list
pool foo {
members 200.200.200.101:7012 {}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if {[HTTP::uri] equals "/"} {
HTTP::uri "/Portal/index.html"
}
HTTP::header replace Host "server.nbc-news.west.foo.com:7012"
}
}
[root@ve10:Active] config ssldump -Aed -nni 0.0 port 443 or port 7012 -k /config/ssl/ssl.key/default.key
New TCP connection 1: 172.28.19.251(44761) <-> 172.28.19.79(443)
1 1 1349110332.3796 (0.0101) C>S SSLv2 compatible client hello
1 2 1349110332.3797 (0.0000) S>CV3.1(81) Handshake
1 3 1349110332.3797 (0.0000) S>CV3.1(953) Handshake
1 4 1349110332.3797 (0.0000) S>CV3.1(4) Handshake
1 5 1349110332.3817 (0.0020) C>SV3.1(262) Handshake
1 6 1349110332.3817 (0.0000) C>SV3.1(1) ChangeCipherSpec
1 7 1349110332.3817 (0.0000) C>SV3.1(36) Handshake
1 8 1349110332.3970 (0.0152) S>CV3.1(1) ChangeCipherSpec
1 9 1349110332.3970 (0.0000) S>CV3.1(36) Handshake
1 10 1349110332.3986 (0.0015) C>SV3.1(184) application_data
---------------------------------------------------------------
HEAD / 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
Accept: */*
Host: abc-news.east.foo.com
---------------------------------------------------------------
New TCP connection 2: 200.200.200.10(44761) <-> 200.200.200.101(7012)
1349110332.4007 (0.0009) C>S
---------------------------------------------------------------
HEAD /Portal/index.html 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
Accept: */*
Host: server.nbc-news.west.foo.com:7012
---------------------------------------------------------------
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
