Forum Discussion
Strange redirection
I'm facing a weird issue - we have two websites (managed through an iRule) under the same HTTPS VIP: https://www.somedomain.com/abc and https://www.somedomain.com/def
Suppose I browse to https://www.somedomain.com/abc - the /abc site comes up fine. Now if I browse to https://www.somedomain.com/def, the browser gets redirected to https://www.somedomain.com/abc
I cleared my browser cache and tried browsing to https://www.somedomain.com/def, the /def site came up fine. But now on browsing to the /abc site, I'm getting redirected back to /def!!
My iRule looks correct (ordering, syntax, etc) and so does the VIP (as far as I can tell). I'm sure the web servers themselves aren't causing the redirection as the issue doesnt happen if i browse the sites locally on the servers.
Any ideas ? I'm using BIG-IP 11.6.0 Build 4.0.420 Hotfix HF4
Thanks!
5 Replies
- skfads_167852
Nimbostratus
You might need to share the irule to comment further.
- THi
Nimbostratus
Do you have separate pools for the sites selected with the iRule? Can you share the iRule?
In case you have separate pools (or servers), this sounds like missing OneConnect profile from the virtual server. More of it here: SOL9800: Using an iRule to load balance HTTP requests to multiple pools
- harshads_204995
Nimbostratus
The irule looks like this:
when HTTP_REQUEST { set uri [string tolower [HTTP::uri]] if { $uri starts_with "/someuri" } {use pool pSomePool} elseif { $uri starts_with "/abc" } {use pool pABC} elseif { $uri starts_with "/def"} {pool pDEF} elseif { $uri starts_with "/someotheruri" } {use pool pSomeOtherPool} }- harshads_204995
Nimbostratus
Also wanted to note that there is no default pool defined on the VIP. Requests are directed to the pools based only on the iRule. Default persistence profile is cookie persistence.
- Stanislas_Piro2
Cumulonimbus
Hi,
the irule should work. switch command is better than multiple "elseif", but it should work.
try this irule :
when HTTP_REQUEST { switch -glob [string tolower [HTTP::path]] { "/someuri*" {use pool pSomePool} "/abc*" {use pool pABC} "/def*" {pool pDEF} "/someotheruri*" {use pool pSomeOtherPool} default { HTTP::respond 404 content { URL Error This URL does not exist on this server } noserver } } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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