Forum Discussion

crizmo_15600's avatar
crizmo_15600
Icon for Nimbostratus rankNimbostratus
Jun 07, 2018

Redirect Policy using 308 instead of 302

Hi All,

 

I was wondering if anyone could help me? I'm looking to implement a policy on a virtual Server that redirects from HTTP to HTTPS. I am currently using a redirect policy to do this by selection redirect as the action with the following tcl code

 

 tcl:https://[HTTP::host][HTTP::uri]

This works fine but the problem is that the clients are sending a POST request and the policy is issuing a 302. This, in turn, is being interpreted by the client as an instruction to issue a GET request.

 

What I'd like to do is issue a redirect using a 308 as opposed to a 302 to prevent this from happening.

 

I'm aware that I could do this via an iRule but it is my understanding that iRules generally have a higher CPU cost. As this will be applied to around 1000 virtual servers I'd like to keep the load to a minimum on our F5 device.

 

Does anyone know of a way to achieve the above using a policy as opposed to an iRule? Please ask any questions, if what I have typed isn't clear.

 

Thanks in advance.

 

Chris