diff --git a/.htaccess b/.htaccess index 179a894e29..493fba56e2 100755 --- a/.htaccess +++ b/.htaccess @@ -1,9 +1,9 @@ # .htaccess -ErrorDocument 400 /cgi-bin/koha/koha-tmpl/errors/400.pl -ErrorDocument 401 /cgi-bin/koha/koha-tmpl/errors/401.pl -ErrorDocument 403 /cgi-bin/koha/koha-tmpl/errors/403.pl -ErrorDocument 404 /cgi-bin/koha/koha-tmpl/errors/404.pl -ErrorDocument 500 /cgi-bin/koha/koha-tmpl/errors/500.pl +ErrorDocument 400 /cgi-bin/koha/errors/400.pl +ErrorDocument 401 /cgi-bin/koha/errors/401.pl +ErrorDocument 403 /cgi-bin/koha/errors/403.pl +ErrorDocument 404 /cgi-bin/koha/errors/404.pl +ErrorDocument 500 /cgi-bin/koha/errors/500.pl diff --git a/Makefile.PL b/Makefile.PL index bac9ff9fdc..d0e277d499 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -250,7 +250,7 @@ my $target_map = { './help.pl' => 'INTRANET_CGI_DIR', './installer-CPAN.pl' => 'NONE', './installer' => 'INTRANET_CGI_DIR', - './koha-tmpl/errors' => {target => 'INTRANET_CGI_DIR', trimdir => 2}, + './errors' => {target => 'INTRANET_CGI_DIR'}, './koha-tmpl/intranet-tmpl' => {target => 'INTRANET_TMPL_DIR', trimdir => -1}, './koha-tmpl/opac-tmpl' => {target => 'OPAC_TMPL_DIR', trimdir => -1}, './kohaversion.pl' => 'INTRANET_CGI_DIR', diff --git a/koha-tmpl/errors/400.pl b/errors/400.pl similarity index 100% rename from koha-tmpl/errors/400.pl rename to errors/400.pl diff --git a/koha-tmpl/errors/401.pl b/errors/401.pl similarity index 100% rename from koha-tmpl/errors/401.pl rename to errors/401.pl diff --git a/koha-tmpl/errors/402.pl b/errors/402.pl similarity index 100% rename from koha-tmpl/errors/402.pl rename to errors/402.pl diff --git a/koha-tmpl/errors/403.pl b/errors/403.pl similarity index 100% rename from koha-tmpl/errors/403.pl rename to errors/403.pl diff --git a/koha-tmpl/errors/404.pl b/errors/404.pl similarity index 100% rename from koha-tmpl/errors/404.pl rename to errors/404.pl diff --git a/koha-tmpl/errors/500.pl b/errors/500.pl similarity index 100% rename from koha-tmpl/errors/500.pl rename to errors/500.pl diff --git a/etc/koha-httpd.conf b/etc/koha-httpd.conf index 542e2e6fd4..d8fc9232a6 100644 --- a/etc/koha-httpd.conf +++ b/etc/koha-httpd.conf @@ -18,6 +18,12 @@ SetEnv PERL5LIB "__PERL_MODULE_DIR__" Options +FollowSymLinks + ErrorDocument 400 /cgi-bin/koha/errors/400.pl + ErrorDocument 401 /cgi-bin/koha/errors/401.pl + ErrorDocument 403 /cgi-bin/koha/errors/403.pl + ErrorDocument 404 /cgi-bin/koha/errors/404.pl + ErrorDocument 500 /cgi-bin/koha/errors/500.pl + # Rewrite Rules RewriteEngine On @@ -46,6 +52,13 @@ SetEnv KOHA_CONF "__KOHA_CONF_DIR__/koha-conf.xml" SetEnv PERL5LIB "__PERL_MODULE_DIR__" Options +FollowSymLinks + + ErrorDocument 400 /cgi-bin/koha/errors/400.pl + ErrorDocument 401 /cgi-bin/koha/errors/401.pl + ErrorDocument 403 /cgi-bin/koha/errors/403.pl + ErrorDocument 404 /cgi-bin/koha/errors/404.pl + ErrorDocument 500 /cgi-bin/koha/errors/500.pl + RewriteEngine On # Uncomment to turn on rewrite logging # RewriteLog __LOG_DIR__/koha-intranet-rewrite.log diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/errors/400.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/errors/400.tmpl new file mode 100644 index 0000000000..b4a0c90d48 --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/modules/errors/400.tmpl @@ -0,0 +1,29 @@ +Koha Online Catalog › An Error Has Occurred + + +
+ + + +