mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Issue #4826 Corrected static redirection.
This commit is contained in:
@@ -465,9 +465,12 @@ class redirection
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strpos($this->subdomain, 'static') !== false)
|
$tmp = explode('.',$this->domain);
|
||||||
|
|
||||||
|
if(!empty($tmp[0]) && strpos($tmp[0], 'static') !== false)
|
||||||
{
|
{
|
||||||
return str_replace($this->subdomain.'.'.$this->domain.'/', $this->domain.'/', $this->self);
|
unset($tmp[0]);
|
||||||
|
return str_replace($this->domain.'/', implode('.',$tmp).'/', $this->self);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@@ -87,8 +87,7 @@
|
|||||||
$result = $this->rd->redirectStaticDomain();
|
$result = $this->rd->redirectStaticDomain();
|
||||||
$this->assertEmpty($result);
|
$this->assertEmpty($result);
|
||||||
|
|
||||||
$this->rd->domain = 'e107.org';
|
$this->rd->domain = 'static1.e107.org';
|
||||||
$this->rd->subdomain = 'static1';
|
|
||||||
$this->rd->staticDomains = ['https://static1.e107.org', 'https://static2.e107.org'];
|
$this->rd->staticDomains = ['https://static1.e107.org', 'https://static2.e107.org'];
|
||||||
|
|
||||||
$this->rd->self = 'https://static1.e107.org/blogs';
|
$this->rd->self = 'https://static1.e107.org/blogs';
|
||||||
|
Reference in New Issue
Block a user