Forum Discussion
Jason_44064
Sep 30, 2011Nimbostratus
Changing Host URL without Redirect - IRULE
Hey all, I have been poking around the forums and couldn't find the exact answer to the IRULE i would like to write; or if its even possible to write this rule. Here's my scena...
Michael_Yates
Sep 30, 2011Nimbostratus
Hi Jason,
Yes you can do that with a HTTP::header replace of the HTTP::host value. There is an example here:
http://devcentral.f5.com/wiki/iRules.HTTP__host.ashx
when HTTP_REQUEST {
if { !([string tolower [HTTP::host]] equals "www.foo.com") } {
HTTP::header replace Host "www.bar.com"
You may or may not need to redirect the traffic to a different pool
depending on your applicaiton setup
pool alternate.website.pool
}
}
Hope this helps.
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