title: Is there any way to force https for some pages in spring-security?
body: <p>currently I'm using tomcat 6 and spring-security 3.0.3.RELEASE without apache. </p>
  
  <p>I can force https for login page and it works just fine.</p>
  
  <p>Next configuration is used to prevent accessing to some pages by http. </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;http use-expressions="true"&gt;
      &lt;intercept-url pattern="/" access="permitAll" /&gt;
      &lt;intercept-url pattern="/login" access="permitAll" requires-channel="https" /&gt;
      &lt;intercept-url pattern="/spring_security_login" access="permitAll" requires-channel="https" /&gt;
      &lt;intercept-url pattern="/users/new" access="permitAll" requires-channel="https" /&gt;
      &lt;intercept-url pattern="/users/authorize/*" access="isAuthenticated()" /&gt;
  
  
      &lt;!--&lt;form-login /&gt; --&gt;
      &lt;form-login  login-page="/login" /&gt;
      &lt;logout /&gt;
      &lt;remember-me /&gt;
  
      &lt;!--
          Uncomment to enable X509 client authentication support &lt;x509 /&gt;
      --&gt;
      &lt;!-- Uncomment to limit the number of sessions a user can have --&gt;
      &lt;session-management&gt;
          &lt;concurrency-control max-sessions="10000"
              error-if-maximum-exceeded="true" /&gt;
      &lt;/session-management&gt;
  
  &lt;/http&gt;
  </code></pre>
  
  <p>But if I try to access to, for example, <strong>/buyers/new</strong> by non https link
  <code>http://localhost:8085/path/buyers/new</code> I get next error:</p>
  
  <pre><code>The page isn't redirecting properly
  
  Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
  
      *   This problem can sometimes be caused by disabling or refusing to accept
            cookies.
  </code></pre>
  
  <p>Cookies are allowed so I think that this is not problem. Similar error I got in Chrome when I tried to access above link.</p>
  
  <p>In my configuration port 8085 is non ssl port. SSL is configured on port 8443 and it works fine.</p>
  
  <p>I want that all access attempts to some pages are redirected to https. </p>
  
  <p>Any advice will be highly appreciated.</p>
  
  <p>Best regards,
  Tiho</p>