40 lines
1.5 KiB
Diff
40 lines
1.5 KiB
Diff
--- a/classes/Tools.php
|
|
+++ b/classes/Tools.php
|
|
@@ -269,9 +269,7 @@
|
|
*/
|
|
public static function getShopDomain($http = false, $entities = false)
|
|
{
|
|
- if (!$domain = ShopUrl::getMainShopDomain()) {
|
|
- $domain = Tools::getHttpHost();
|
|
- }
|
|
+ $domain = Tools::getHttpHost(false, false, true);
|
|
if ($entities) {
|
|
$domain = htmlspecialchars($domain, ENT_COMPAT, 'UTF-8');
|
|
}
|
|
@@ -292,14 +290,12 @@
|
|
*/
|
|
public static function getShopDomainSsl($http = false, $entities = false)
|
|
{
|
|
- if (!$domain = ShopUrl::getMainShopDomainSSL()) {
|
|
- $domain = Tools::getHttpHost();
|
|
- }
|
|
+ $domain = Tools::getHttpHost(false, false, true);
|
|
if ($entities) {
|
|
$domain = htmlspecialchars($domain, ENT_COMPAT, 'UTF-8');
|
|
}
|
|
if ($http) {
|
|
- $domain = static::getProtocol((bool) Configuration::get('PS_SSL_ENABLED')) . $domain;
|
|
+ $domain = static::getProtocol(Tools::usingSecureMode()) . $domain;
|
|
}
|
|
|
|
return $domain;
|
|
@@ -2246,7 +2242,7 @@
|
|
$rewrite_settings = (int) Configuration::get('PS_REWRITING_SETTINGS', null, null, (int) $uri['id_shop']);
|
|
}
|
|
|
|
- $domain_rewrite_cond = 'RewriteCond %{HTTP_HOST} ^' . $domain . '$' . PHP_EOL;
|
|
+ $domain_rewrite_cond = ''; // EduBox: removed HTTP_HOST condition for dynamic domains
|
|
// Rewrite virtual multishop uri
|
|
if ($uri['virtual']) {
|
|
if (!$rewrite_settings) {
|