From 9580a231b3d3f912f46066009114a2929ecbb16a Mon Sep 17 00:00:00 2001 From: Federico Bruni Date: Fri, 25 Mar 2016 14:54:20 +0100 Subject: [PATCH] issue 4813: replace urchin.js with analytics.js and fix redundant hostnames This patch aims at fixing two warnings reported by Google Analytics: 1. analytics.js is the new javascript library which replaces urchin.js 2. the website should be available at one hostname only and we chose lilypond.org over www.lilypond.org --- Documentation/web/server/lilypond.org.htaccess | 4 ++++ scripts/build/website_post.py | 15 +++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Documentation/web/server/lilypond.org.htaccess b/Documentation/web/server/lilypond.org.htaccess index c6da26a1bb..29d9028411 100644 --- a/Documentation/web/server/lilypond.org.htaccess +++ b/Documentation/web/server/lilypond.org.htaccess @@ -16,6 +16,10 @@ RewriteEngine On +# Permanent redirect from www.lilypond.org to lilypond.org +RewriteCond "%{HTTP_HOST}" "^www\.(.+)$" [NC] +RewriteRule "^/?(.*)$" "http://%1/$1" [R=301,L,NE] + # Deny following of symlinks by robots. # HTTrack is a known offender. # better yet, to redirect this to page that tells adminstrator diff --git a/scripts/build/website_post.py b/scripts/build/website_post.py index a6fafdc012..9fba75445f 100644 --- a/scripts/build/website_post.py +++ b/scripts/build/website_post.py @@ -198,12 +198,15 @@ for file in html_files: ### add google tracker header if (line.find("") >= 0): outfile.write(""" - - """); #### add google tracker goals -- 2.39.2