Bugzilla – Attachment 17151 Details for
Bug 9683
Allow disable rewrite apache mod
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9683: Allow disable rewrite apache mod
Bug-9683-Allow-disable-rewrite-apache-mod.patch (text/plain), 3.15 KB, created by
Mason James
on 2013-04-02 22:05:23 UTC
(
hide
)
Description:
Bug 9683: Allow disable rewrite apache mod
Filename:
MIME Type:
Creator:
Mason James
Created:
2013-04-02 22:05:23 UTC
Size:
3.15 KB
patch
obsolete
>From 2890e67a0c80db1613ef321ceacfc54ad12f9dff Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Thu, 21 Feb 2013 15:26:32 +0100 >Subject: [PATCH] Bug 9683: Allow disable rewrite apache mod >Content-Type: text/plain; charset="utf-8" > >In Apache config koha-httpd.conf, URL-rewriting is enabled and does not allow to disable mod_rewrite. >Also, first rewriting rule "RewriteRule (.+) $1?%1%2 [N,R,NE]" is enabled by default. This rule rewrites nearly every URL. I propose to comment it in sources so that is must be intentionally enabled. > >This patch sets rewriting options into a conditional tag. > >Test plan : >Test OPAC and intranet with and without mod_rewrite activated. > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >Signed-off-by: Mason James <mtj@kohaaloha.com> >--- > etc/koha-httpd.conf | 48 +++++++++++++++++++++++++++--------------------- > 1 files changed, 27 insertions(+), 21 deletions(-) > >diff --git a/etc/koha-httpd.conf b/etc/koha-httpd.conf >index 0e7af51..67c54f0 100644 >--- a/etc/koha-httpd.conf >+++ b/etc/koha-httpd.conf >@@ -82,18 +82,20 @@ > ErrorDocument 404 /cgi-bin/koha/errors/404.pl > ErrorDocument 500 /cgi-bin/koha/errors/500.pl > >-# Rewrite Rules >- RewriteEngine On >- >-# Uncomment to turn on rewrite logging >-# RewriteLog __LOG_DIR__/koha-opac-rewrite.log >-# RewriteLogLevel 1 >- RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*) >- RewriteRule (.+) $1?%1%2 [N,R,NE] >- >- RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/opac-detail\.pl?bib=$1 [PT] >- RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT] >- RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT] >+ <IfModule mod_rewrite.c> >+ # Rewrite Rules >+ RewriteEngine On >+ >+ # Uncomment to turn on rewrite logging >+ #RewriteLog __LOG_DIR__/koha-opac-rewrite.log >+ #RewriteLogLevel 1 >+ >+ RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*) >+ #RewriteRule (.+) $1?%1%2 [N,R,NE] >+ RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/opac-detail\.pl?bib=$1 [PT] >+ RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT] >+ RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT] >+ </IfModule> > </VirtualHost> > > ## Intranet >@@ -167,14 +169,18 @@ > </IfModule> > </IfModule> > >- RewriteEngine On >-# Uncomment to turn on rewrite logging >-# RewriteLog __LOG_DIR__/koha-intranet-rewrite.log >-# RewriteLogLevel 1 >+ <IfModule mod_rewrite.c> >+ # Rewrite Rules >+ RewriteEngine On >+ >+ # Uncomment to turn on rewrite logging >+ #RewriteLog __LOG_DIR__/koha-intranet-rewrite.log >+ #RewriteLogLevel 1 > >- RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*) >- RewriteRule (.+) $1?%1%2 [N,R,NE] >- RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/detail\.pl?bib=$1 [PT] >- RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT] >- RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT] >+ RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*) >+ #RewriteRule (.+) $1?%1%2 [N,R,NE] >+ RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/detail\.pl?bib=$1 [PT] >+ RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT] >+ RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT] >+ </IfModule> > </VirtualHost> >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9683
:
15586
|
16215
| 17151