Forum Discussion
Dharmendra_2243
Nimbostratus
Nov 09, 2010redirection but url not change on browser
Forward all http requests for http://test.abc.com/try to http://pass.xyz.com The idea here is to maintain the URL as http://test.abc.com/try on the user’s browser while the content/site served up is f...
nitass
Employee
Nov 11, 2010pls feel free to revise.
virtual bar1 {
destination 172.28.17.52:http
ip protocol tcp
rules rewrite1
profiles {
http {}
tcp {}
}
}
rule rewrite1 {
when HTTP_REQUEST {
if { [HTTP::uri] eq "/try" } {
HTTP::header replace Host "www.google.com.sg"
HTTP::uri "/"
node [RESOLV::lookup @8.8.8.8 "www.google.com.sg"] 80
} else {
pool foo1
}
snat automap
}
}
pool foo1 {
members 10.10.70.120:http {}
}
curl -I http://172.28.17.52/
HTTP/1.1 200 OK
Date: Thu, 11 Nov 2010 04:35:04 GMT
Server: Apache/2.0.59 (rPath)
Last-Modified: Thu, 11 Nov 2010 04:23:21 GMT
ETag: "1315d-5f-5580a040"
Accept-Ranges: bytes
Content-Length: 95
Content-Type: text/html; charset=UTF-8
curl -I http://172.28.17.52/try
HTTP/1.1 200 OK
Date: Thu, 11 Nov 2010 14:13:16 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Set-Cookie: PREF=ID=c809c46b5959f7f0:FF=0:TM=1289484796:LM=1289484796:S=ye5asa5vGc6AHd1X; expires=Sat, 10-Nov-2012 14:13:16 GMT; path=/; domain=.google.com.sg
Set-Cookie: NID=40=ly0AIjIvqNT6hFqH3MTxoMIkkO7K6novG9ZqqqcZ5-5xzCzopkHqBeGW5QguqO6HqJFuARliJhFaInZXIZI7Jj--uQoMne7XFs5E0x_6oGhGHeJGKOCQ6s3hzIdcR3Je; expires=Fri, 13-May-2011 14:13:16 GMT; path=/; domain=.google.com.sg; HttpOnly
Server: gws
X-XSS-Protection: 1; mode=block
Transfer-Encoding: chunked
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