[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#877367: www.debian.org Bug #877367: please add redirects for Debian Policy manual in website



Updated the patch (to the current git repo status) and submitted the RT
ticket #7028.

Cheers

-- 
Laura Arjona Reina
https://wiki.debian.org/LauraArjona

>From ef03d0aa5fd2999720f2cd492b6aa82823e1bd1f Mon Sep 17 00:00:00 2001
From: Laura Arjona Reina <larjona@debian.org>
Date: Fri, 22 Dec 2017 21:57:33 +0100
Subject: [PATCH] Add redirections for the Debian Policy manual (now in single
 page)

---
 modules/roles/templates/apache-www.debian.org.erb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/modules/roles/templates/apache-www.debian.org.erb b/modules/roles/templates/apache-www.debian.org.erb
index 2ae810a3..9c6ea363 100644
--- a/modules/roles/templates/apache-www.debian.org.erb
+++ b/modules/roles/templates/apache-www.debian.org.erb
@@ -222,7 +222,7 @@
    RewriteRule ^/ports/freebsd(.*) /ports/kfreebsd-gnu/ [R=301]
    RewriteRule ^/devel/debian-installer/report-template(.*) /releases/stable/i386/ch05s04.html#submit-bug [NE,R=301]
    RewriteRule ^/devel/debian-installer/hooks(.*) https://d-i.alioth.debian.org/doc/internals/apb.html [R=301]
-   RewriteRule ^/doc/packaging-manuals/mime-policy(.*) /doc/debian-policy/ch-opersys.html#s-mime [NE,R=301]
+   RewriteRule ^/doc/packaging-manuals/mime-policy(.*) /doc/debian-policy/#multimedia-handlers [NE,R=301]
 
    RewriteRule ^/volatile/index.* - [S=1]
    RewriteRule ^/volatile/.+ /volatile/ [L,R=301]
@@ -250,6 +250,12 @@
    RewriteRule ^/doc/(manuals/)?maint-guide/ch-(.*) /doc/manuals/maint-guide/$2 [R=301]
    RewriteRule ^/doc/(manuals/)?maint-guide/footnotes(.*) /doc/manuals/maint-guide/index$2 [R=301]
 
+# Compatibility after Debian Policy changed to single page manual
+   RewriteRule ^/doc/debian-policy/ap-([^/]+).html(.*) /doc/debian-policy/#document-ap-$1 [NE,R=301]
+   RewriteRule ^/doc/debian-policy/ch-([^/]+).html(.*) /doc/debian-policy/#document-ch-$1 [NE,R=301]
+   RewriteRule ^/doc/debian-policy/upgrading-checklist.html(.*) /doc/debian-policy/#upgrading-checklist [NE,R=301]
+   RewriteRule ^/doc/debian-policy/footnotes.html(.*) /doc/debian-policy/ [R=301,L]
+ 
 # Canonical place for manuals under /doc/manuals/
    RewriteCond %{DOCUMENT_ROOT}/doc/manuals/$1 -d
    RewriteRule ^/doc/([^/]+)/?(.*)? /doc/manuals/$1/$2 [L,R=301]
-- 
2.11.0



Reply to: