Forum Discussion
gerald_wegener_
Nimbostratus
Jun 12, 2006Eliminate redirects
In lieu of doing http redirects in the following example basic example:
--------
Client connects to http://abc.com and is redirected to http://www.abc.com
--------
...
gerald_wegener_
Nimbostratus
Aug 10, 2006It's been awhile but I'm back on this. I tried the above iRule but it doesn't seem to rewrite the hostname. Here is the rule I'm using and some log entries that show it's not rewriting the hostname:
when HTTP_REQUEST {
if { [HTTP::host] equals "abc.com" } {
log local0. "orig hostname [HTTP::host]"
HTTP::header replace Host "www.[HTTP::host]"
log local0. "rewritten hostname is [HTTP::host]"
}
}
Aug 10 18:04:36 127.1.1.3 tmm1[2341]: Rule hostname_rewrite : orig hostname abc.com
Aug 10 18:04:36 127.1.1.3 tmm1[2341]: Rule hostname_rewrite : rewritten hostname is abc.com
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