Forum Discussion
Pav_70755
Nimbostratus
Oct 26, 2010HTTP Re-Direct and keep original URL in address bar
I have the following simple re-direct in place
}
elseif { [HTTP::host] == "www.domain.com }{
HTTP::redirect "http://www.abc.com/subject"
I basically want the address bar to keep ...
Pav_70755
Nimbostratus
Jan 27, 2011Hi Aaron,
The re-direct I rule I have set up is as follows
Un-comment the following lines if the site uses SSL
when CLIENT_ACCEPTED {
TCP::collect 5
}
when CLIENT_DATA {
if { [matchclass [TCP::payload] starts_with $::http_methods] } {
SSL::disable
}
}
when HTTP_REQUEST {
if { [TCP::local_port] eq "80" } {
persist source_addr 1800
HTTP::fallback http://support.abc.com/
Un-comment the next 3 lines for redirects and expand out with elseif's if needed
if { [HTTP::host] == "www.abc1.com" } {
HTTP::redirect "http://url1.com"
}
elseif { [HTTP::host] == "www.abc2.com" } {
HTTP::redirect "http://host2.com"
}
elseif { [HTTP::host] == "www.domain3.com" } {
HTTP::redirect "http://www.url4.com"
} else {
pool Web_Farm_Front
Un-comment the net line if using redirects
}
} elseif { [TCP::local_port] eq "443" } {
HTTP::header insert "BPL-SSL" "On"
pool Web_Farm_Front
} else {
set srvr [findclass [TCP::local_port] $::Individual_Servers " "]
if { $srvr ne "" } {
node $srvr 80
} else {
}
}
}
} So do I need to set up a separate pool to use for the header re-write rule?
Thanks
Pav
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
