Forum Discussion

Raviteja_Danda_'s avatar
Raviteja_Danda_
Icon for Nimbostratus rankNimbostratus
Oct 04, 2017

Need to redirect to new page with post method

Hi All, I have a Requirement : If HeaderInfo has Authentication Code: redirect to page 1 else: redirect to page 2(which provides accesstoken and must be POST method) But When I am trying to redirect to page2, Browser is giving back error as "must use Http POST",

 

I am new to F5, can anyone please help.

 

  • What HTTP response code are you using for the redirect?

    The irules HTTP::redirect uses a HTTP 302. Conventional browser behaviour for a 302 redirect replaces the POST method with a GET.

    The HTTP 307 redirect will do a redirect that does not change the method. If you are using an irule, use HTTP::respond 307 ...

    Please note, not all browsers will correctly follow a 307