Note that there are some explanatory texts on larger screens.

plurals
  1. POForce some pages over HTTPS and others to HTTP... is it possible?
    primarykey
    data
    text
    <p>I'm really stuck on this one...</p> <p>Basically, I'm trying to make 2 pages always over SSL using the URLRewrite add-on for IIS. But I also need to force all other pages to HTTP (sigh - don't ask).</p> <p>But if I force other pages over HTTP, then when you view the SSL page you'll get the security warning. I tried to solve this by checking if the HTTP_REFERER is the SSL page then let it be sent over SSL for that page only. This doesn't work because if someone clicks a link on the SSL page then it will stay over SSL.</p> <p>Is this even possible?...</p> <p>This is as far as I got so far:</p> <pre><code>&lt;rewrite&gt; &lt;rules&gt; &lt;rule name="Force HTTPS Login" stopProcessing="true"&gt; &lt;match url="(.+)login.aspx" /&gt; &lt;conditions&gt; &lt;add input="{HTTPS}" pattern="^OFF$" /&gt; &lt;/conditions&gt; &lt;action type="Redirect" url="https://{HTTP_HOST}/{R:0}" redirectType="Permanent" /&gt; &lt;/rule&gt; &lt;rule name="Force HTTPS Payments" stopProcessing="true"&gt; &lt;match url="(.+)payments.aspx" /&gt; &lt;conditions&gt; &lt;add input="{HTTPS}" pattern="^OFF$" /&gt; &lt;/conditions&gt; &lt;action type="Redirect" url="https://{HTTP_HOST}/{R:0}" redirectType="Permanent" /&gt; &lt;/rule&gt; &lt;rule name="Others Force HTTP" stopProcessing="true"&gt; &lt;match negate="true" url="((.+)login.aspx|(.+)payments.aspx)" /&gt; &lt;conditions&gt; &lt;add input="{HTTPS}" pattern="^ON$" /&gt; &lt;add input="{HTTP_REFERER}" negate="true" pattern="(.+)login.aspx" /&gt; &lt;add input="{HTTP_REFERER}" negate="true" pattern="(.+)payments.aspx" /&gt; &lt;/conditions&gt; &lt;action type="Redirect" url="http://{HTTP_HOST}/{R:0}" redirectType="Permanent" /&gt; &lt;/rule&gt; &lt;/rules&gt; &lt;/rewrite&gt; </code></pre> <p>UPDATE: Found this article: <a href="https://stackoverflow.com/questions/2357455/rewrite-http-to-https-on-some-pages-only-using-htaccess/8191154#8191154">Rewrite http to https on some pages only using .htaccess</a>. No answer since March 2010...!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload