Forum Discussion
French_Poul_307
Nimbostratus
Jun 10, 2010iRules for reverse proxy
Hello,
First, I'm sorry for my english ; I'm french and I talk a very bad english...
I'm new with BigIP and with iRules, so I have some difficulties to do what I want... :-(
I have a BigIP 6900, a...
Michael_Yates
Nimbostratus
Jun 11, 2010HTTP::redirect is a full 302 redirect, so you have to provide it the entire URL.
Try this:
when HTTP_REQUEST {
if { not ([HTTP::uri] equals "/french/") } {
HTTP::redirect "http://[getfield [HTTP::host] ":" 1]/french/"
}
}
The second example you gave doesn't actually change anything. It reads and compares the [HTTP::uri] and if it equals "/french" then your telling it to change the [HTTP::uri] to "/french/".
If you told hit to change it to "/english/" then it would change the request sent to the server, but not change what was displayed in the browser.
The browser would show:
http://www.website.com/french/
The server would see:
http://www.website.com/english/
You would use this if you wanted to simplify the vanity URL, but actually had your website code arranged differently.
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