<?php

if($_SERVER['HTTP_X_FORWARDED_PROTO']=='http'){
    $url = 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
    header('HTTP/1.1 301 Moved Permanently');
    header('Location: '.$url);
    exit();    
}

// Version
define('VERSION', '2.2.0.0');

// Configuration
if (is_file('config.php')) {
	require_once('config.php');
}

// Install
if (!defined('DIR_APPLICATION')) {
	header('Location: install/index.php');
	exit;
}
//$response->addHeader('Strict-Transport-Security: max-age=31536000');
// Startup
require_once(DIR_SYSTEM . 'startup.php');

$application_config = 'catalog';
 error_reporting(0);
// Application
require_once(DIR_SYSTEM . 'framework.php');