Bug 41167 - Rewrite Rules missing in etc/koha-httpd.conf
Summary: Rewrite Rules missing in etc/koha-httpd.conf
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (command-line installer) (show other bugs)
Version: 25.05
Hardware: All All
: P5 - low major
Assignee: vivek
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-03 04:50 UTC by vivek
Modified: 2025-11-04 10:19 UTC (History)
3 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Proposed patch for Bug 41167 – Add missing rewrite rules in koha-httpd.conf (1.53 KB, patch)
2025-11-03 06:30 UTC, vivek
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description vivek 2025-11-03 04:50:34 UTC
Dear Koha Team,

In the Koha 25.05.x version, I noticed that the file koha-httpd.conf in the tarball (or Git-based) installation is missing several important rewrite rules under the intranet section.

Because of this, when Koha is installed from source (tar or Git), many modules on the staff interface (such as Acquisitions) do not function correctly.

However, when Koha is installed via APT packages, the correct koha-httpd.conf file is included, and everything works properly.

The following rewrite rules are missing and should be added:

RewriteRule ^/cgi-bin/koha/erm/.$ /cgi-bin/koha/erm/erm.pl [PT]
RewriteCond %{REQUEST_URI} !^/cgi-bin/koha/preservation/..pl$
RewriteRule ^/cgi-bin/koha/preservation/.$ /cgi-bin/koha/preservation/home.pl [PT]
RewriteRule ^/cgi-bin/koha/admin/record_sources(.)?$ /cgi-bin/koha/admin/record_sources.pl$1 [PT]
RewriteCond %{QUERY_STRING} booksellerid=(.)
RewriteRule ^/cgi-bin/koha/acqui/supplier.pl$ /cgi-bin/koha/acquisition/vendors/%1? [R]
RewriteRule ^/cgi-bin/koha/acquisition/vendors(.)?$ /cgi-bin/koha/acqui/vendors.pl$1 [PT]

Please include these rules in the official koha-httpd.conf source TAR package file for future releases to ensure full functionality when Koha is installed from the tarball or Git source.

Thank you for your attention to this issue.
Comment 1 David Cook 2025-11-03 05:03:33 UTC
Looking at "etc/koha-httpd.conf", it looks like the erm and preservation rules have been put into the OPAC virtualhost by accident instead of the staff interface virtualhost.

And it does look like the others are missing all together. 

This should've been caught during QA of those changes.
Comment 2 vivek 2025-11-03 06:30:31 UTC
Created attachment 188883 [details] [review]
Proposed patch for Bug 41167 – Add missing rewrite rules in koha-httpd.conf

Proposed patch for Bug 41167.

This patch adds missing RewriteRules for ERM, Preservation and Acquisition modules in koha-httpd.conf to restore staff client functionality.

Test plan:
1. Apply patch
2. Restart Apache
3. Access acquisitions and ERM pages
4. Confirm functionality restored

Signed-off-by: Vivek Kumar <vivek.kumar@bestbookbuddies.com>"