Forum Discussion
Jim_Betts_47293
Nimbostratus
Mar 25, 2008URL rewrite frustration
Howdy All:
After spending at least 4 hours searching DevCentral and dozens of attempts at trying to code the rules I need some help.
I have a web server (actually a Tumbleweed Secu...
Juerg_Wiesmann
Nimbostratus
Mar 25, 2008Hi there,
Thats what I used to replace the HostHeader...
Basically replacing the URI with the complete Request in a http class should be ok.
Like replacing HTTP:uri with http://securemail.corp.com:8080[HTTP::uri]
This will normally cause the hostheader to be ignored.
Are you using a oneconnect profile ?
when HTTP_REQUEST {
set my_host [string tolower [HTTP::host]]
if {[HTTP::host] starts_with "leon.demo.com"} {
set destination_host hsrvepp1.demo.com
set source_host http://leon.demo.com
HTTP::header replace "Host" $destination_host}
log local0. [HTTP::header Host]
}
when HTTP_RESPONSE {
set server_location [string tolower [HTTP::header Location]]
if {$server_location starts_with "http://hsrvepp1.demo.com"} {
HTTP::header replace "Location" $source_host}
log local0. [HTTP::header Location]
}Good Luck
Wiesmann
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
