Forum Discussion
carter91_13591
Oct 26, 2010Nimbostratus
Custom iRULE for Specific subsites (Wordpress)
We use our F5 Big IP for SSL offloading for our webserver, and life has been good with that. Works great.
We are starting to move to WordPress as our content management solution on our webs...
hooleylist
Nov 01, 2010Cirrostratus
I haven't checked all of the sample request/responses, but it looks like the app is URL encoding the redirect location. You could add URI decoding to the iRule to handle this:
when HTTP_RESPONSE {
Check if server response is a redirect and contains the wp-admin pattern (with URI decoding of the Location header)
if { [HTTP::header is_redirect] and \
[string match -nocase {*www.server.com/*/wp-admin*} [URI::decode [HTTP::header Location]]]} {
Log original and updated values
log local0. "Original Location header value: [HTTP::header value Location],\
updated: [string map -nocase "http:// https://" [HTTP::header value Location]]"
Do the update, replacing http:// with https://
HTTP::header replace Location [string map -nocase "http:// https://" [HTTP::header value Location]]
}
}
Aaron
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