I have a https section of my site I am using with Freemember. But when I logout it takes me to the http version. How can I make it logout but stay https?

<a href="{exp:freemember:logout_url return='"{current_path}"'}" >Logout</a>

2 Answers 2


You'll find this issue with a number of tags and modules, you can use a module like : https://devot-ee.com/add-ons/https-support to alter the base site_index variable globally according to the protocol being used. No need to alter 3rd party code...

  • Amazing find! This instantly fixed the issue with Freemember Forgot Password forms not working, and removed the mixed content warning from the EE Simple Search too.
    – Jammooka
    Jun 24, 2016 at 13:53

In the mod.freemember.php

After the following code (line 221):

$url = ee()->functions->fetch_site_index().QUERY_MARKER.
        'ACT='.ee()->functions->fetch_action_id(__CLASS__, 'act_logout');

Add the following code:

if (ee()->TMPL->fetch_param('secure_action') == 'yes') {  
        $url = str_replace('http://', 'https://', $url);  

This will change the logout url to https. You have to add secure_action to logout url as follows:

{exp:freemember:logout_url return="" secure_action="yes"}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.