Forum Discussion
sosomiqautadze_
Nimbostratus
Sep 12, 2018Irule Redirection Problems
on one virtual server need publish 3 sites;
site A ( this site is on IIS and i need redirect request to this site subdirectory);
site B ;
...
youssef1
Cumulonimbus
Sep 13, 2018Hi,
can you try this irule:
when HTTP_REQUEST priority {
switch [string tolower [HTTP::host]] {
"SiteA.com" {
if { [HTTP::uri] == "/" } {
HTTP::redirect "https://SiteA.com/subdirectory"
}
SSL::disable serverside
pool A
}
"SiteB.com" { pool B }
"SiteC.com" { pool C }
}
}
As you can noticed, I disable ssl server on site A side, Can you confirm that poolmember in pool A don't listen in 443 (TLS).
Second point In your VS don't forget to
set a oneconnect profil
. is important it will allow you to do a per request decision for forwardin to the right pool.
Last point i modified the condition for Site A, I set
[HTTP::uri] == "/"
instead [HTTP::uri] ends_with "/"
, I think that it's more logical and is what you want to do!!!
last point let me know if you see again in your browser ";; and not http://siteA.com/subdirectory. In this case we will need to set a rewrite the location header.
keep me update.
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