Forum Discussion
El_Jefe
Nimbostratus
Jul 31, 2011Need ideas for a "garbage collector" iRule
Hello,
I have been working with the F5 for a bit, and have written some simple iRules. However, I am getting a little stuck on this one. We are running an Oracle 11G Fusion Middleware app for a large university. We have recently added in this app to our F5, and I need some ideas.
In the past, we had "garbage collection" rules on the Apache server, so that it always re-directed requests to HTTPS and to the right virtual directory. Now, we have multiple Apache servers load balanced, and SSL is off loaded to the Virtual HTTPS server on the F5. If our users type in -
http://department.university.edu
OR
http://department.university.edu/
OR
https://department.university.edu
OR
http://department.university.edu/Application
We need it re-directed to
https://department.university.edu/Application/
and IF it comes in on https://department.university.edu/Application - leave it alone.... let it do it's thing.
Right now, If I run traffic through the F5, and they type it wrong, they get the "Welcome to Oracle Fusion Middleware" page, and that's kinda bad.
Any help would be GREATLY appreciated!
Thanks,
Jeff
9 Replies
Sort By
- Hamish
Cirrocumulus
Assuming you have two VS's with unique iRUles. On the HTTP one you just needHTTP::redirect "https://[HTTP::host]/Application/
if { {[HTTP::uri] equals ""} or { [HTTP::uri] equals "/"} pr { [HTTP::uri] equals "/Application" } { HTTP::redirect "/Application/" }
- El_Jefe
Nimbostratus
Yep - I do have to different Virtual Servers one for 80 and the other for 443. - The_Bhattman
Nimbostratus
Hi El Jefe, - El_Jefe
Nimbostratus
Yes, it auto-reloads every so often as it has dynamic content on the first page. - El_Jefe
Nimbostratus
I thought that the issue was that the HTTP VS was tied to the same pool resources. So, I removed that pool, since the HTTP VS is only doing a re-direct anyway, but that didn't seem to solve it. - El_Jefe
Nimbostratus
Plodding along.... I found that this works - - El_Jefe
Nimbostratus
Here is what I finally settled on for the HTTPS rule - - The_Bhattman
Nimbostratus
hi El_Jefe,when HTTP_REQUEST { if { [HTTP::host] eq "host.department.university.edu" } { set URI "/Application/faces/oracle/webcenter/portalapp/pages/login.jspx" switch -glob [string tolower [HTTP::uri] { "/" - "/application" { HTTP::redirect "https://[HTTP::host]/$uri" } default { HTTP::redirect "https://[HTTP::host]/$uri } } } }
- hoolio
Cirrostratus
A couple of minor edits:
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