2 Replies Latest reply on Aug 28, 2008 2:30 AM by Santanu Karar


    Santanu Karar Level 1

      I've an application which should only runs in 'https' mode. So, here what I've done is, I've initiated a protocol check with URLUtil.getProtocol(url), which returns me 'http' or 'https', then what I want is, to automatically set that 'http' to 'https' from Flex and by without refreshing the browser, I can proceed to call the other internal functions which runs only with 'https' protocol. Is it possible..?

      I've tried with URLUtil.replaceProtocol(URLUtil.getProtocol(url) , 'https'), but it not seems working! Maybe its only read-only (?) returning a String? How can I achieve this process? Is it feasible also?

      Please suggest!

      Thanks & Regards,

        • 1. Re: URLUtil.replaceProtocol
          anirudhs Level 2

          URLUtil functions work on a URL string. It cannot perform redirection to a https url. It will replace http with https in a url. That's all.

          Ideally, you should be configuring such redirecting in the web server or on the worst case, with a blank html page which redirects to the https link.

          It is not possible to go from a http to https link without refreshing the browser or navigating away from the http page.
          • 2. Re: URLUtil.replaceProtocol
            Santanu Karar Level 1
            Hmm thanks for the reply Anirudhs, its helpful to understand the feasibility rather than searching blindly over the net. Thanks!