ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

SSL and Member Login Form - Making Form Action https instead of http

December 14, 2010 12:21pm

Subscribe [3]
  • #1 / Dec 14, 2010 12:21pm

    sm9

    352 posts

    Hi there,

    I need to add SSL to the member section of a EE 1.6.9 website. The certificate is all setup and working on the server, but the thing which is letting me down is the EE member login form. The form action has a value of http://www.mywebsite.com instead of https://www.mywebsite.com.

    How would I go about changing this?

    Thanks,

    Stephen

  • #2 / Dec 14, 2010 5:54pm

    Ingmar

    29245 posts

    The simplest way would be to rewrite all appropriate http requests on your server to use https instead. I understand there are also some third-party add-ons.

  • #3 / Dec 14, 2010 7:12pm

    sm9

    352 posts

    Hi Ingmar,

    Can you clarify what you mean when you say, the “simplest way would be to rewrite all appropriate http requests on your server to use https instead” please?

    I wasn’t sure if you’re talking about some sort of htaccess rules, to manually hard-code https URL’s where needed (which is what I tried to do at first, before realising that I couldn’t amend the http action of the member login form to https), or use https for the entire site (which I’d like to avoid for performance reasons), or something else.

    I was hoping there was just a way to make the login form use https instead of http and I’d be fine.

    That third party addon was for EE2 only too.

    Thanks,

    Stephen

  • #4 / Dec 15, 2010 10:42am

    Sue Crocker

    26054 posts

    Hi, Stephen. Are you using an embedded login form, or the standard one?

  • #5 / Dec 15, 2010 11:53am

    sm9

    352 posts

    Hi Sue,

    I’m embedding the login form if a user is logged out with this code:

    {if logged_out}
    {embed="modules/portal-login"}
    {/if}

    And here’s the contents of that embed:

    {exp:member:login_form return="/portal/"}
    
    <label>Username</label>
    
    <input type="text" name="username" value="" maxlength="32" class="input" size="25" /></p>
    
    <label>Password</label>
    
    <input type="password" name="password" value="" maxlength="32" class="input" size="25" /></p>
    
    {if auto_login}
    <input class='checkbox' type='checkbox' name='auto_login' value='1' /> Auto-login on future visits
    {/if}
    
    <input type="submit" name="submit" value="Submit" /></p>
    
    <h4><a href="http://{path=member/forgot_password}">If you have forgotten or need to reset your password, please click here.</a></h4>
    
    <p>{/exp:member:login_form}

    Thanks,

    Stephen

  • #6 / Dec 15, 2010 5:41pm

    Ingmar

    29245 posts

    Can you clarify what you mean when you say, the “simplest way would be to rewrite all appropriate http requests on your server to use https instead” please?

    Yes, a server side rewrite was what I had in mind. Redirect all requests to http://example.com/foo/bar to https://example.com/foo/bar.

    I was hoping there was just a way to make the login form use https instead of http and I’d be fine.

    I am afraid there is no such built-in feature.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases