summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.htaccess1
-rw-r--r--core/templates/403.php15
2 files changed, 16 insertions, 0 deletions
diff --git a/.htaccess b/.htaccess
index ebb28b0887b..11520d743dc 100644
--- a/.htaccess
+++ b/.htaccess
@@ -1,3 +1,4 @@
+ErrorDocument 403 /core/templates/403.php
ErrorDocument 404 /core/templates/404.php
<IfModule mod_php5.c>
php_value upload_max_filesize 512M
diff --git a/core/templates/403.php b/core/templates/403.php
new file mode 100644
index 00000000000..cdfef08ac76
--- /dev/null
+++ b/core/templates/403.php
@@ -0,0 +1,15 @@
+<?php
+if(!isset($_)){//also provide standalone error page
+ require_once '../../lib/base.php';
+
+ $tmpl = new OC_Template( '', '403', 'guest' );
+ $tmpl->printPage();
+ exit;
+}
+?>
+<ul>
+ <li class='error'>
+ <?php echo $l->t( 'Access forbidden' ); ?><br/>
+ <p class='hint'><?php if(isset($_['file'])) echo $_['file']?></p>
+ </li>
+</ul>