Forum Discussion
PacketHead_4009
Dec 14, 2011Nimbostratus
Simple iRule with Sticky?
Hello, I'm trying to create what I think is a fairly simple iRule: when HTTP_REQUEST { if { [HTTP::uri] contains "/sites/tech*" } { pool Tech_Web_Pool_80 ...
PacketHead_4009
May 15, 2012Nimbostratus
Ok, I need to fire this thread up again. The script that Hoolio provided is working like a champ. Now we are migrating and we are hitting a small issue. First here is the modified version of his iRule:
when HTTP_REQUEST {
Check the requested URI to see if it is a non-default pool request
switch -glob [string tolower [HTTP::uri]] {
"*/sites/webservices*" -
"*/sites/humanresources*" -
"*/sites/itplanning*" -
"*/*" -
"*/mysite*" {
pool SP2003_Web_Pool_80
}
default {
No match on the URI, so check the Referer header
to see if it is a non-default pool request
switch -glob [string tolower [HTTP::header Referer]] {
"*/sites/webservices*" -
"*/sites/humanresources*" -
"*/sites/itplanning*" -
"*/*" -
"*/mysite*" {
pool SP2003_Web_Pool_80
}
default {
No match on URI or Referer so use the main pool
pool SP2010_Web_Pool_80
}
}
}
}
}
So our plan is to migrate everything to the SP2010 web pool. We will accomplish this by removing one of the migrated sites from the iRule; for example "/sites/webservices". If we remove the line it will go to the default rule and go to the SP2010 web pool. Here is the issue. They plan to migrate the main page "/" and "/default.aspx" first. Here is the issue. For any sites that are NOT yet migrated and set to go to the SP2003 web pool when we click on the main intranet logo it tries to go back to our default page "/default.aspx". The problem is that it doesn't go to the SP2010 instance it stays on the SP2003 web pool. I'm guessing this is due to the referrer statement? Is there a better way to do this now that we are moving the main page first?
Sorry for the long thread but this has me pulling my hair out. Thank you!
- James
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