Forum Discussion
rprague_79440
Feb 13, 2012Nimbostratus
First, thank you for the reply, I think I've got this down, but there are a couple of questions I have.
first, we don't use www.domain.com, its just domain.com, so is there any problem with creating this iRule:
rule myrule {
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
set cust [getfield [HTTP::uri] "/" 2]
if {[class match -- $cust equals name_dg]} {
HTTP::redirect "https://[class match -value $cust equals name_dr] $host[HTTP::uri]"
}
}
}
What is should do is change https://domain.com/customer/admin to https://sub.domain.com/customer/admin if I have that worded right.
I can't actually test it, because I can't figure out how to create the "name_dg" class you showed in your reply. If you have any pointers on doing that, I'd appreciate it. I'll keep digging through the knowledge base in the meantime.