Forum Discussion
eesgro_26208
Nimbostratus
Aug 12, 2010URI rewrite question
To all,
I am no means an iRule programmer. I a merely an administrator of the LTM.
Anyhow here is my situation.
We have a website that people access via dummywebsite.co...
Chris_Miller
Altostratus
Aug 12, 2010This is how I'd do it:
when HTTP_REQUEST {
if { [HTTP::host] eq "dummywebsite.com" } {
HTTP::redirect "http://www.[HTTP::host][HTTP::uri]" }
}
I think you can use [HTTP::host] from within the HTTP::redirect event...if you can't, the following should work:
This is how I'd do it:
when HTTP_REQUEST {
if { [HTTP::host] eq "dummywebsite.com" } {
HTTP::redirect "http://www.dummywebsite.com[HTTP::uri]" }
}
In your example, you're replacing a header on the way to the server...and you'd have to specify that it's the "host" header that you want to rewrite.
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
