From 7a1b35c9d00712a303f4b0f78cd34f3c5397f97e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 11 May 2022 09:57:28 +0200 Subject: [PATCH] Bug 32030: Add Apache RewriteRule This is going to be awesome! Signed-off-by: Jonathan Field Signed-off-by: Martin Renvoize Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- debian/templates/apache-shared-intranet.conf | 2 ++ etc/koha-httpd.conf | 2 ++ 2 files changed, 4 insertions(+) diff --git a/debian/templates/apache-shared-intranet.conf b/debian/templates/apache-shared-intranet.conf index 7e58a48158..dbeaf0dca5 100644 --- a/debian/templates/apache-shared-intranet.conf +++ b/debian/templates/apache-shared-intranet.conf @@ -20,6 +20,8 @@ RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT] RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT] RewriteRule ^(.*)_[0-9]{2}\.[0-9]{7}\.(js|css)$ $1.$2 [L] +RewriteRule ^/cgi-bin/koha/erm/.*$ /cgi-bin/koha/erm/erm.pl [PT] + Alias "/api" "/usr/share/koha/api" Options +ExecCGI +FollowSymlinks diff --git a/etc/koha-httpd.conf b/etc/koha-httpd.conf index a1fef2a814..6b4b65de4e 100644 --- a/etc/koha-httpd.conf +++ b/etc/koha-httpd.conf @@ -105,6 +105,8 @@ RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT] RewriteRule ^(.*)_[0-9]{2}\.[0-9]{7}\.(js|css)$ $1.$2 [L] + RewriteRule ^/cgi-bin/koha/erm/.*$ /cgi-bin/koha/erm/erm.pl [PT] + # REST API configuration Alias "/api" "__API_CGI_DIR__" -- 2.39.5