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.

HTTPS with the Discussion Forum Module

July 21, 2010 8:45pm

Subscribe [2]
  • #1 / Jul 21, 2010 8:45pm

    nathanpitman

    531 posts

    We’re deploying the Discussion Forum module for a client and they require that this is delivered through HTTPS. I ‘thought’ this would be pretty easy to achieve but although I can redirect requests for the forum URL using mod_rewrite this doesn’t help with form submissions which all take place over plain old HTTP.

    I’m hoping (please!!!) that there is some way I could conditionally change the base URL which the forum module uses by adding some code to path.php or similar…

    Any ideas greatly appreciated!!!

  • #2 / Jul 21, 2010 9:06pm

    nathanpitman

    531 posts

    Solution #1:

    Add the following to your path.php file (EE1):

    $segs = explode("/", $_SERVER['PATH_INFO']);
    if ($segs[1]=="forums") {
        $site_url = "https://${_SERVER['HTTP_HOST']}/";
    } else {
        $site_url = "http://${_SERVER['HTTP_HOST']}/";
    }

    Huzzah!

  • #3 / Jul 22, 2010 6:23am

    Ingmar

    29245 posts

    Thank you for sharing your solution, Nathan 😊

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

ExpressionEngine News!

#eecms, #events, #releases