Hi - hoping someone can help with a HTTP Class Profile I have that does a redirect on URI Path Lists.
I have 2 VS, one HTTP & one HTTPS. Any requests for http://domain/contact\* are sent to the HTTPS site. This is done via an iRule and works fine.
With the HTTPS VS I have a httpclass profile that sends ALL requests to the HTTP site UNLESS it is for /contact*, so I only want the /contact* requests to be secure.
It’s come to light that I also need to add /images* & /css* to this ignore list. So these pages can be served from either the HTTP or HTTPS VS. At present if you request https://domain/images/top.gif you get sent to the HTTP site but this file is used in the /contact* page and causes browsers to complain that the whole page is not secure.
In my httpclass the URI Paths is to “Match Only” “regex (?i)^(?!/contact).+$” - so if the request DOES NOT match /contact* then send to HTTP.
I thought I could just add the following to the URI Path List in the GUI but this does not work, no errors are generated in the ltm log when I do this but requests for files under /images* for example still get sent to the HTTP site even though I requested them via HTTPS?
regex “(?i)^(?!/images).+$”
regex “(?i)^(?!/css).+$”
Does anyone know how to get this to work, any help would be appreciated.
The bigip.conf for this profile is:
profile httpclass redirect_httpsclass {
defaults from httpclass
pool none
redirect “http://[HTTP::host][HTTP::uri]”
paths regex “(?i)^(?!/contact).+$”
}
Thanks - Julian.