Forum Discussion
sidiov
Nimbostratus
Jan 11, 2012transparent redirect question
Hi,
I want to take a request to a domain that contains a string and redirect based on that string without the client knowing a redirect took place (ie. getting different content based on tha...
nitass
Employee
Jan 12, 2012the rule looks just fine for me. may you capture packet to see what is going on?
[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
profiles {
http {}
tcp {}
}
}
[root@ve1023:Active] config b pool foo list
pool foo {
members 200.200.200.101:80 {}
}
[root@ve1023:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "/11string11"}{
set uri [string map {"/11string11" ""} [HTTP::uri] ]
HTTP::header replace "Host" "beta-s.domain.com"
HTTP::uri "$uri"
}
}
}
[root@ve1023:Active] config ssldump -Aed -nni 0.0 port 80
New TCP connection 1: 172.28.19.253(38669) <-> 172.28.19.79(80)
1326337897.9044 (0.0018) C>S
---------------------------------------------------------------
HEAD /11string11/junk.txt HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8r zlib/1.2.3 libidn/0.6.5
Host: 172.28.19.79
Accept: */*
---------------------------------------------------------------
New TCP connection 2: 200.200.200.10(38669) <-> 200.200.200.101(80)
1326337897.9064 (0.0009) C>S
---------------------------------------------------------------
HEAD /junk.txt HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8r zlib/1.2.3 libidn/0.6.5
Host: beta-s.domain.com
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