title: How to force HTTPS using a web.config file
body: <p>I have searched around Google and StackOverflow trying to find a solution to this, but they all seem to relate to ASP.NET etc.</p>
  
  <p>I usually run Linux on my servers but for this one client I am using Windows with IIS 7.5 (and Plesk 10). This being the reason why I am <strong>slightly unfamiliar with IIS and web.config</strong> files. In an <code>.htaccess</code> file you can use rewrite conditions to detect whether the protocol is HTTPS and redirect accordingly. Is there a <strong>simple way</strong> to achieve this using a web.config file, or even using the '<strong>URL Rewrite</strong>' module that I have installed?</p>
  
  <p>I have <strong>no experience with ASP.NET</strong> so if this is involved in the solution then please include clear steps of how to implement.</p>
  
  <p>The reason for me doing this with the web.config and <strong>not</strong> PHP is that I would like to force HTTPS on all assets within the site.</p>