Forum Discussion
plavender_72604
Nimbostratus
May 12, 2010URL rewrites for multiple domains
Hopefully someone can help me out here, scripting is not my strong point and each time I try to search this forum I get an error :-(
I would like to set up the F5 so that multiple sub domain...
plavender_72604
Nimbostratus
May 13, 2010Hi Aaron,
Many thanks for the response! So at the moment, what we are trying to do is rewrite from aaa.domain.com to domain.com/aaa. Once the rewrite has happened, we need the requests to stay with the /aaa or /bbb as the path, so I'm not too sure if I'd need to add your suggestion or not?
I've also just remembered, that we are using another iRule to change pools if there is less than 2 servers available:
when HTTP_REQUEST {
if { [active_members http_pool] >= 2 } {
pool primary_pool
} else {
pool alternate_pool }
}
So I am guessing, the iRule would need to be configured as follows:
when HTTP_REQUEST {
Check host/uri (set to lowercase)
switch "[string tolower [HTTP::host]]" {
"aaa.domain.com" {
Rewrite host/URI
HTTP::header replace Host "domain.com"
HTTP::uri "/aaa"
if { [active_members http_pool] >= 2 } {
pool aaa_pool
} else {
pool aaa_alternate_pool
}
Thanks again!
PeterHelp 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
