November 2018: Registration is broken at the moment - we are working on it. Sorry for the inconvenience!
Check the blog for the latest news about the ongoing FlatPress revival!
Enable HTTPS
  • Hi,

    in this discussion, NoWhereMan suggested a change for enabling HTTPS support (see also quietdragon's patch which takes up NoWhereMan's approach). While this works fine on the blog itself, it leaves invalid URLs in the RSS feed which look like //my.dom.ain/2016/07/13/title/ - this won't lead me to my blog ;)
    I decided to go with quietdragon's initial approach, slightly altered:

    define('BLOG_BASEURL', 'http' . (isset($_SERVER['HTTPS']) ? 's':'') . '://'.$_SERVER['HTTP_HOST']. BLOG_ROOT);

    The whole topic is a littler older, though - did I miss a common best way to handle this? How did you other guys do it?

  • An other way for HTTP or HTTPS support without any restrictions can be:
    Add this lines in the defaults.php:

    if (isset($_SERVER['HTTPS'])) {
        $_SERVER['HTTPS'] = htmlspecialchars($_SERVER['HTTPS'], ENT_QUOTES, "UTF-8");
      $serverport = "false";
      // Unterstützung für Apache und IIS
      if (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == '1' || strtolower($_SERVER['HTTPS'])=='on')) { 
        $serverport = "https://";
      } else {  
        $serverport = "http://";

    and then replace following lines

    // compatibility with ISS
     if (!isset($_SERVER['REQUEST_URI']))
      $_SERVER['REQUEST_URI'] = 'http://localhost/flatpress/';
     define('BLOG_BASEURL', 'http://'.$_SERVER['HTTP_HOST']. BLOG_ROOT);

    with the HTTP or HTTPS patch lines:

    // compatibility with ISS
     if (!isset($_SERVER['REQUEST_URI']))
      $_SERVER['REQUEST_URI'] = $serverport . 'localhost/flatpress/';
     define('BLOG_BASEURL', $serverport . $_SERVER['HTTP_HOST'] . BLOG_ROOT); 

Start a New Discussion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion