Forum Discussion
rprague_79440
Nimbostratus
Feb 10, 2012Redirecting https traffic to an https subdomain?
Quick disclaimer, while I know what iRules do, I haven't bothered implementing any, because we haven't really needed to, but laws make things complicated, so we're looking for a way to reroute traffic...
rprague_79440
Nimbostratus
Feb 13, 2012First, 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.
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