Forum Discussion
CraigM_17826
Jan 06, 2012Altocumulus
parsing a datagroup/class
Hi all,
I have this situation. Our iRule for our main website now has a lot of redirects which are based on the URI specified. There are now getting to be quite a few of these and for vari...
nitass
Jan 09, 2012Employee
[root@ve1023:Active] config b virtual bar list
virtual bar {
destination 172.28.19.79:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve1023:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
set new_uri [class match -value -- [string tolower [HTTP::uri]] equals uri_map_dg]
if {$new_uri ne ""}{
HTTP::redirect http://[HTTP::host]$new_uri
}
}
}
[root@ve1023:Active] config b class uri_map_dg list
class uri_map_dg {
{
"/contactus" { "/public/contact-us" }
"/help" { "/public/help" }
}
}
[root@ve1023:Active] config curl -I http://172.28.19.79/contactus
HTTP/1.0 302 Found
Location: http://172.28.19.79/public/contact-us
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@ve1023:Active] config curl -I http://172.28.19.79/contactUS
HTTP/1.0 302 Found
Location: http://172.28.19.79/public/contact-us
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@ve1023:Active] config curl -I http://172.28.19.79/help
HTTP/1.0 302 Found
Location: http://172.28.19.79/public/help
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@ve1023:Active] config curl -I http://172.28.19.79/Help
HTTP/1.0 302 Found
Location: http://172.28.19.79/public/help
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
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