Forum Discussion
MeAndMyBIGIP_60
Nimbostratus
Jun 21, 2010HTTP::URI redirect to another Pool
Trying to use the sample code here (http://devcentral.f5.com/wiki/default.aspx/iRules/HTTP__uri.html) to do something that should be very simple:
when HTTP_REQUEST {
if { [HTTP::uri] ends_with "content1" } {
pool content_pool_1
} elseif { [HTTP::uri] starts_with "/abc" } {
pool abc_servers
}
}The idea being that:
for users browsing to www.website.com/content1 >> they go to the content_pool_1 servers, everything else goes to content_pool_2 servers
But after I enable the rule, I keep getting 404 errors in server in content_pool_2.
The Virtual Server currently points to content_pool_2... how do I/do I need to somehow point the Virtual Server to both content_pool_1 and content_pool_2?
Right now, content_pool_1 isn't assigned to a Virtual Server... does it need to be?
Doesn't seem like this should be so difficult...
47 Replies
- What_Lies_Bene1
Cirrostratus
For the port 80 Virtual Server;when HTTP_REQUEST { if { [string tolower [HTTP::uri]] equals "/" } { HTTP::respond 301 Location "https://suppose.com/psp/rewrite/redirect" return } } - What_Lies_Bene1
Cirrostratus
For the port 443 Virtual Server, assign a Stream Profile and this iRule;when HTTP_REQUEST { STREAM::disable if { [string tolower [HTTP::uri]] equals "/" } { HTTP::respond 301 Location "https://suppose.com/psp/rewrite/redirect" return } } when HTTP_RESPONSE { STREAM::expression {@http://@https://@} STREAM::enable } - What_Lies_Bene1
Cirrostratus
To assign the Stream Profile in the GUI: Local Traffic > Virtual Servers > Name > Stream Profile > stream - r_dynamo_79563
Nimbostratus
I'm using version 11.1.0, and I don't see the option of Stream Profile to be configured on the virtual server. Do I have to feed the command manually? - What_Lies_Bene1
Cirrostratus
Is the Virtual Server not configured as a Standard VS? If not, how did you ever apply a ClientSSL profile? - r_dynamo_79563
Nimbostratus
It's a standard VS but I don't seen any option for applying a stream profile to the VS. However, there is an option to configure a stream profile. - r_dynamo_79563
Nimbostratus
It's a standard VS but I don't seen any option for applying a stream profile to the VS. However, there is an option to configure a stream profile. - What_Lies_Bene1
Cirrostratus
Strange, it should be there, see the attached screenshot.
- r_dynamo_79563
Nimbostratus
From FTP Profile in 'Configuration', I have
SSL Profile (Client)
SSL Profile (Server)
VLAN and Tunnel Traffic
SNAT Pool
But no Stream Profile
In Access Policy, I have
Access Profile
Connectivity Profile
Rewrite Profile
Citrix Support
OAM Support - What_Lies_Bene1
Cirrostratus
Are you running LTM?
Could it be hiding behind the 'Resources' tab at the top of the screen?
Help 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