Forum Discussion
Olivier_Minet_6
Jan 28, 2014Nimbostratus
Replace subdomain and remove path
Greetings,
I'm struggling with this :
I would like this :
http://www.mysite.org/customfiles/mydoc.htm
transformed into this:
http://customfiles.mysite.org/mydoc.htm
Of course, there are seve...
nitass
Feb 04, 2014Employee
e.g.
config
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
destination 172.28.24.10:80
ip-protocol tcp
mask 255.255.255.255
pool foo
profiles {
http { }
tcp { }
}
rules {
myrule
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 2
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm pool foo
ltm pool foo {
members {
200.200.200.101:80 {
address 200.200.200.101
}
}
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule myrule
ltm rule myrule {
when HTTP_REQUEST {
if { [HTTP::path] starts_with "/customfiles/" } {
HTTP::uri [string map {/customfiles/ /} [HTTP::uri]]
HTTP::header replace Host "customfiles.mysite.org"
}
}
}
trace
[root@ve11a:Active:In Sync] config ssldump -Aed -nni 0.0 port 80
New TCP connection 1: 172.28.24.1(36831) <-> 172.28.24.10(80)
1391521795.0090 (0.0011) C>S
---------------------------------------------------------------
GET /customfiles/mydoc.htm 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: www.mysite.org
---------------------------------------------------------------
New TCP connection 2: 200.200.200.14(36831) <-> 200.200.200.101(80)
1391521795.0275 (0.0173) C>S
---------------------------------------------------------------
GET /mydoc.htm 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: customfiles.mysite.org
---------------------------------------------------------------
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