Forum Discussion
Mohamed_Lrhazi
Altocumulus
Mar 20, 2013Help improve http redirect iRule
I wrote this iRule so that my team could hopefully manage HTTP redirects easily, using a simple string data class with this format :
Host,URI,TARGET_URL,HTTP_CODE
Example:
www.example....
nitass
Employee
Mar 20, 2013*example.com,/foo/bar*,http://target.site.com/path/two,301is it possible to not use wildcard on http host? if so, i think by modifying data group data a bit we will be able to use "class match" command instead of comparing one by one.
[root@ve10:Active] config b class exact_class list
class exact_class {
"www.example.com/" { "http://target.site.com/path,302" }
}
[root@ve10:Active] config b class starts_with_class list
class starts_with_class {
"bha.example.com/foo/bar" { "http://target.site.com/path/two,301" }
}
just my 2 cents
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