b374k
m1n1 1.01
Apache/2.4.41 (Ubuntu)
Linux vmi616275.contaboserver.net 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64
uid=33(www-data) gid=33(www-data) groups=33(www-data)
server ip : 62.171.164.128 | your ip : 127.0.0.1
safemode OFF
 >  / home / a / home / dev2.destoffenstraat.com /
Filename/home/a/home/dev2.destoffenstraat.com/index.php
Size1.41 kb
Permissionrw-r--r--
Ownerroot : root
Create time21-Aug-2025 12:26
Last modified07-Mar-2025 07:49
Last accessed21-Aug-2025 12:26
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
<?php
/**
* Application entry point
*
* Multi-store configuration to handle different domains
* and ensure compatibility with and without 'www'
*/

try {
require __DIR__ . '/app/bootstrap.php';
} catch (\Exception $e) {
echo <<<HTML
<div style="font:12px/1.35em arial, helvetica, sans-serif;">
<div style="margin:0 0 25px 0; border-bottom:1px solid #ccc;">
<h3 style="margin:0;font-size:1.7em;font-weight:normal;text-transform:none;text-align:left;color:#2f2f2f;">
Autoload error</h3>
</div>
<p>{$e->getMessage()}</p>
</div>
HTML;
exit(1);
}

// Define domain mappings for multi-store setup
$domains = [
'www.destoffenstraat.com' => 'nl',
'destoffenstraat.com' => 'nl',
'www.laruedutissu.com' => 'fr',
'laruedutissu.com' => 'fr',
'www.streetoffabrics.com' => 'en',
'streetoffabrics.com' => 'en',
];

$host = $_SERVER['HTTP_HOST'] ?? '';

if (isset($domains[$host])) {
$_SERVER[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'base'; // Website code remains 'base'
$_SERVER[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website';
$_SERVER['MAGE_RUN_CODE'] = $domains[$host]; // Set store view code
$_SERVER['MAGE_RUN_TYPE'] = 'store';
}

$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
/** @var \Magento\Framework\App\Http $app */
$app = $bootstrap->createApplication(\Magento\Framework\App\Http::class);
$bootstrap->run($app);