Forum Discussion
Julian_Grunnell
Nimbostratus
Apr 26, 2007iRule for adding a Header
Hi - I have an LTM that does client side SSL for a secure website. The website behind the LTM is also available on port 80. Some of the pages must only be avaiable via HTTPS, but at present you can get to them all via HTTP as well.
As this is a customers website at present I don't if this is 1 file or a hundred files. The iRule below I've used in the past to make sure a single redirect works.
when HTTP_REQUEST {
if { [HTTP::uri] == "/content/contact/contactus.aspx" }{
HTTP::redirect "https://[HTTP::host]/content/contact/contactus.aspx"
}
}
Can anyone provide an iRule that would work for multiple pages? Or suggest a way to maybe insert a Header for the HTTPS requests that the webserver can then read?
Thanks - Julian.
- hoolio
Cirrostratus
Hello,class redirectURIs { /my/application/directory /another/appdir /yet/another }
when HTTP_REQUEST { if { [matchclass [HTTP::uri] starts_with $::redirectURIs] } { HTTP::redirect http://www.domain.com/unavailable.html } }
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