>From d84186e5e52e24107cf24e64de1a394571bf01c3 Mon Sep 17 00:00:00 2001 From: Felix Janda Date: Sun, 24 Feb 2013 11:37:51 +0100 Subject: [PATCH 2/3] Redirect from /website/ to / Some pages on lilypond.org lie in the subdirectory /website/. Apache's mod_rewrite is being used to make these pages also available when omitting /website/ in the URI. Therefore several pages can be reached from two different URIs and are both indexed by search engines. This commit sets up a permanent redirect from the subdirectory /website/ to the root of the server in order the mark the URI without /website/ as the preferable form. --- Documentation/web/server/lilypond.org.htaccess | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/web/server/lilypond.org.htaccess b/Documentation/web/server/lilypond.org.htaccess index b4780a9..20ea7bc 100644 --- a/Documentation/web/server/lilypond.org.htaccess +++ b/Documentation/web/server/lilypond.org.htaccess @@ -23,6 +23,11 @@ RewriteEngine On RewriteCond %{HTTP_USER_AGENT} httrack [NC] RewriteRule ^.*/source/.*$ /please-respect-robots.txt.html [L] +# Redirect from /website to root +# We use THE_REQUEST here in order to prevent redirect loops +RewriteCond %{THE_REQUEST} /website/ +RewriteRule ^website/(.*)$ /$1 [R=301,L] + # Permanent top level entry points -- ./doc RedirectMatch ^/music-glossary /glossary RedirectMatch ^/tutorial /learning -- 1.7.12.4