For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Brian_Gibson_30's avatar
Brian_Gibson_30
Icon for Nimbostratus rankNimbostratus
Jul 08, 2016

Syntax error in solutions article

So I'm trying to follow a solutions article on how to redirect all requests from http to https.

 

https://support.f5.com/kb/en-us/solutions/public/14000/900/sol14996.html

 

When I enter this into the tmsh shell..

 

create /ltm policy httptohttps controls add { forwarding } requires add { http } strategy first-match rules add { redirect { actions add { 0 { http-reply redirect location "https://[getfield [HTTP::host] \":\" 1][HTTP::uri]" } } } }

 

I get

 

01071748:3: Policy '/Common/httptohttp', rule 'redirect'; invalid url, value 'https://[getfield [HTTP::host] ":" 1][HTTP::uri]'.

 

Any idea what is problem with the redirect url? Heck even finding some relevant documentation would be helpful.

 

1 Reply

  • Hi, maybe it helps you:

     

    https://devcentral.f5.com/questions/ltm-policy-http-reply-issuecomment24762

     

    Regards