Forum Discussion
Scott_85950
Sep 23, 2011Nimbostratus
iRule - HTTPS redirect to HTTP
Is it possible to redirect a URL currently rendering in HTTPS, back to HTTP?
I know that some browser types will notify users that they are about to leave
an HTTPS page, however the benefits outweigh the down falls.
If I place the following iRule in my 443 profile, it will not redirect to HTTP as
directed, assuming HTTPS. Apologies if this is a junior mistake. Just need some
advise.
when HTTP_REQUEST {
if {[HTTP::host] eq "www.yyy.com"} {
HTTP::redirect "http://zzz.ccc.com[HTTP::uri]"
}
}
8 Replies
Sort By
- Hi Scott,
- Morning Aaron,
- Hi Scott,
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] contains "/pdf" && [TCP::local_port] == 443 } { HTTP::redirect "http://[getfield [HTTP::host] ":" 1]/pdf/[URI::basename [HTTP::uri]]" } }
- The "& amp; & amp;" should be replaced with 2 "&" characters.
- Thank you Michael, I'll try this out right away.
- Hi Michael,
- Disregard, should have read both of your responses. Thanks agian.
- The iRule submitted successfully to my 443 virtual server. When the criteria meets both /pdf and port 443, it seems to ignore the iRule completely, returning the same response in 443. I made sure the iRule was at the top of the priority list sort order to ensure no conflicts.
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