1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 12:20:44 +02:00

Issue #4826 Corrected static redirection.

This commit is contained in:
Cameron
2022-07-26 12:35:06 -07:00
parent dbd8cee77e
commit a181afcbd8
2 changed files with 6 additions and 4 deletions

View File

@@ -465,9 +465,12 @@ class redirection
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;

View File

@@ -87,8 +87,7 @@
$result = $this->rd->redirectStaticDomain();
$this->assertEmpty($result);
$this->rd->domain = 'e107.org';
$this->rd->subdomain = 'static1';
$this->rd->domain = 'static1.e107.org';
$this->rd->staticDomains = ['https://static1.e107.org', 'https://static2.e107.org'];
$this->rd->self = 'https://static1.e107.org/blogs';