Forum Discussion
Heidi_35827
Nimbostratus
Nov 08, 2011iRule for HTTP redirect from retired URL to new URL
I'm new to iRules and could use some help. I think I have a pretty basic question but I'm not finding the answer after a few searches in DevCentral.
Here is what I'm trying to do....we ha...
nitass
Employee
Jun 02, 2013just another example.
e.g.
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if { [HTTP::host] starts_with "www" } {
HTTP::respond 301 noserver Location "http://[string map {www abc} [HTTP::host]][HTTP::uri]"
}
}
}
[root@ve10:Active] config curl -I http://www.foo.com/something
HTTP/1.0 301 Moved Permanently
Location: http://abc.foo.com/something
Connection: Keep-Alive
Content-Length: 0
[root@ve10:Active] config
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