Forum Discussion
Arie
Altostratus
Apr 30, 2008HELP! - what's wrong with this redirect?
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/account" } {
HTTP::redirect https://www.domain2.com[HTTP::uri]
}
}
Arie
Altostratus
Apr 30, 2008Scenario:
Domain www.domain.org is being phased out and replaced with www2.domain.com. However, at this time only certain pages/sections of this site are to be redirected.
Need to forward all requests to www.domain.org/account/* to www2.domain.com/account/.
Couple of VS in play here:
- vs_www.domain.org_80
- vs_www2.domain.com_443
There's a pool vs_www.domain.org_443 also, but for now I'm starting with getting the simples version to work.
iRules on vs_www.domain.org_80:
- redirect_account (name of the iRule that's not working)
- more redirects and other iRules, but since redirect_account is the first one I assume that the others won't be invoked if there's a match for www.domain.org/account/. (BTW, I am correct in this assumption, I hope?)
iRules on vs_www2.domain.com_443:
- select pool based on URI, since some parts of the sites are running on .NET and others on ColdFusion and not all servers are running ColdFusion.
URI's all work great if entered manually. (https://www2.domain.com/account/subfolder/)
I'm still digging for related errors in the log.
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
