With Bug 9683, we removed an unnecessary RewriteRule from the Apache configuration. However, by removing that RewriteRule directive, we accidentally made the preceding RewriteCond affect the following rule instead: RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/opac-detail\.pl?bib=$1 [PT] So I'm just going to remove the RewriteCond from etc/koha-httpd.conf as it's causing problems with a rewrite rule which works with Debian packages and properly configured source installs.
Created attachment 63709 [details] [review] Bug 18669 - RewriteCond affecting wrong rule in koha-httpd.conf One of the RewriteCond directives in koha-httpd.conf was affecting the wrong RewriteRule after its original RewriteRule was commented out years ago. _TEST PLAN_ 0) Before applying patch, build Koha from source *) make *) make install (or make upgrade) *) Copy or symlink etc/koha-httpd.conf to your Apache vhost directory (and enable if you're on a Debian based system) *) Restart Apache 1) Make sure that you have at least 1 bibliographic record in Koha (URL like this http://server:port/cgi-bin/koha/opac-detail.pl?biblionumber=1) 2) Go to http://server:port/bib/1 3) Note that you get a 404 error 4) Apply the patch 5) Rebuild Koha from source as per step 0 6) Go to http://server:port/bib/1 7) Note that you now see the same page as you would if you went to http://server:port/cgi-bin/koha/opac-detail.pl?biblionumber=1
Created attachment 63711 [details] [review] [SIGNED-OFF] Bug 18669 - RewriteCond affecting wrong rule in koha-httpd.conf One of the RewriteCond directives in koha-httpd.conf was affecting the wrong RewriteRule after its original RewriteRule was commented out years ago. _TEST PLAN_ 0) Before applying patch, build Koha from source *) make *) make install (or make upgrade) *) Copy or symlink etc/koha-httpd.conf to your Apache vhost directory (and enable if you're on a Debian based system) *) Restart Apache 1) Make sure that you have at least 1 bibliographic record in Koha (URL like this http://server:port/cgi-bin/koha/opac-detail.pl?biblionumber=1) 2) Go to http://server:port/bib/1 3) Note that you get a 404 error 4) Apply the patch 5) Rebuild Koha from source as per step 0 6) Go to http://server:port/bib/1 7) Note that you now see the same page as you would if you went to http://server:port/cgi-bin/koha/opac-detail.pl?biblionumber=1 Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
I just signed off, because it does work as described, but I am just curious if we should make the changes from bug 9683 and this bug to debian apache templates too...
(In reply to Josef Moravec from comment #3) > I just signed off, because it does work as described, but I am just curious > if we should make the changes from bug 9683 and this bug to debian apache > templates too... Thanks, Josef. I figure it's probably a good idea to update the Debian templates as well, but I imagine that should be a separate bug. Soon, I'm going to set up a Debian virtual machine to test Debian-specific patches so maybe at that point I'll post some patches (or be able to test someone else's).
Created attachment 63740 [details] [review] Bug 18669 - RewriteCond affecting wrong rule in koha-httpd.conf One of the RewriteCond directives in koha-httpd.conf was affecting the wrong RewriteRule after its original RewriteRule was commented out years ago. _TEST PLAN_ 0) Before applying patch, build Koha from source *) make *) make install (or make upgrade) *) Copy or symlink etc/koha-httpd.conf to your Apache vhost directory (and enable if you're on a Debian based system) *) Restart Apache 1) Make sure that you have at least 1 bibliographic record in Koha (URL like this http://server:port/cgi-bin/koha/opac-detail.pl?biblionumber=1) 2) Go to http://server:port/bib/1 3) Note that you get a 404 error 4) Apply the patch 5) Rebuild Koha from source as per step 0 6) Go to http://server:port/bib/1 7) Note that you now see the same page as you would if you went to http://server:port/cgi-bin/koha/opac-detail.pl?biblionumber=1 Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 17.05, thanks David!
This patch has been pushed to 16.11.x and will be in 16.11.09.
Pushed to 16.05.x, for 16.05.15 release