6 Replies Latest reply on Aug 24, 2011 11:00 AM by asabban

    V6 redirect to HTTPS

      Can anyone suggest how I can redirect a request to a HTTP address to HTTPS?


      I want to make sure that POST data is being sent via HTTPS.  I have no control over the remote server so cant tell the client to redirect to HTTPS so I need to do it in the proxy before it leaves.

        • 1. Re: V6 redirect to HTTPS

          Hi Lance,


          that should be possible.


          I think first of all you need to create an action that can do the redirect for you. On Configuration -> Action Editor create a new action. Name it accordingly and then  add the parameter "Redirect URL" and add the URL, such as https://www.mysite.com.


          Now go to the HTTP method filter list and create an Entry for the URL in http, such as http://www.mysite.com and choose your new action as the action to execute.


          If possible I would not try to redirect the POST request itself. Instead I would try to pick the very first request to the URL (which usually should be a GET), and redirect the User to the URL in https. Once the site is accessed in https, all form submissions etc should be https as well.


          Maybe this gives you a hint. I have not tested this yet, but this is how I would try to set this up.




          • 2. Re: V6 redirect to HTTPS

            Thanks i'll give it a try.  Curios does the URL have to be a static URL?  im using google translate API to translate sites on my intranet.  THe URL is dynamically generated but always start with the same address http://translate.googleapis.com but then always has a dynamic part on the end.

            • 3. Re: V6 redirect to HTTPS

              Ok I tried this starting simple and tried to redirect a certain site to google.  This didnt work.  I have attached a copy of the Action and thr HTTP Method filter i setup.  One thing to note is if I change the Action from redirect to Block it does apply the block action so i thought maybe it is the action thats the problem but cant get it to work as expected.  With the redirect action it goes to the originally requested page when I want it to go to Googleaction.jpghttp method filter.jpg

              • 4. Re: V6 redirect to HTTPS

                ok so i got it to do a basic redirect now.  THe problem was in the Custom Action the web action needed to be changed from Pass to Block.  Then it redirected me to google.  Now next step is to see about going to a HTTPS address and then a URL that is dynamic, i think that isnt going to work however

                • 5. Re: V6 redirect to HTTPS

                  Yep simply putting https:// .... works just fine to.

                  • 6. Re: V6 redirect to HTTPS

                    Hi Lance,


                    not sure if this will help you, but you may try to use variables to cover dynamic URLs... it should be possible to use %u for the URL, or %H for the hostname for example. All options are shown in the Reference Guide.


                    Honestly I am not sure if they can be used within the actions. I believe I have seen this before, but did not explicitly test yet.