Forum Discussion
Yolanda_Almonte
Nimbostratus
Oct 09, 2013Need iRule for 301 redirection
I would like to ask expert assistance creating an iRule on the LTM to perform a 301 redirection. The following is required:
If requested URL contains hostname example.edu (not case sensitive)...
Mohamed_Lrhazi
Altocumulus
Oct 09, 2013Can you try this:
when HTTP_REQUEST {
set r_host [HTTP::header "Host"]
switch $r_host {
"example.edu" -
"new.example.edu" {
HTTP::respond 301 "Location" "http://www.example.edu[HTTP::uri]"
}
}
}
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