diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-07-26 16:30:09 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-07-26 16:30:09 +0200 |
commit | 0de90cfc672ebb8bb7c8ffa01d40380715c42f94 (patch) | |
tree | 75d1daf5cd28d515b0fd0a8e8515815c13995d99 /core | |
parent | 174cd4f478b0c555a23ddb5de3aedae3aac82220 (diff) | |
download | nextcloud-server-0de90cfc672ebb8bb7c8ffa01d40380715c42f94.tar.gz nextcloud-server-0de90cfc672ebb8bb7c8ffa01d40380715c42f94.zip |
Fix 403 and 404 redirect
* Nextcloud is not properly loaded in the standalone version (especially the theming)
* it is already not listed anymore in the Nginx config (see nextcloud/documentation#392)
* the index.php-free version doesn't support this
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'core')
-rw-r--r-- | core/templates/403.php | 8 | ||||
-rw-r--r-- | core/templates/404.php | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/core/templates/403.php b/core/templates/403.php index 7d07c72c873..e053fad764a 100644 --- a/core/templates/403.php +++ b/core/templates/403.php @@ -1,10 +1,10 @@ <?php // @codeCoverageIgnoreStart -if(!isset($_)) {//also provide standalone error page +if(!isset($_)) {//standalone page is not supported anymore - redirect to / require_once '../../lib/base.php'; - - $tmpl = new OC_Template( '', '403', 'guest' ); - $tmpl->printPage(); + + $urlGenerator = \OC::$server->getURLGenerator(); + header('Location: ' . $urlGenerator->getAbsoluteURL('/')); exit; } // @codeCoverageIgnoreEnd diff --git a/core/templates/404.php b/core/templates/404.php index cc45cbeaf5d..0f7318e937a 100644 --- a/core/templates/404.php +++ b/core/templates/404.php @@ -3,11 +3,11 @@ /** @var $l \OCP\IL10N */ /** @var $theme OCP\Defaults */ // @codeCoverageIgnoreStart -if(!isset($_)) {//also provide standalone error page +if(!isset($_)) {//standalone page is not supported anymore - redirect to / require_once '../../lib/base.php'; - - $tmpl = new OC_Template( '', '404', 'guest' ); - $tmpl->printPage(); + + $urlGenerator = \OC::$server->getURLGenerator(); + header('Location: ' . $urlGenerator->getAbsoluteURL('/')); exit; } // @codeCoverageIgnoreEnd |