From: Federico Bruni Date: Fri, 25 Mar 2016 13:54:20 +0000 (+0100) Subject: issue 4813: replace urchin.js with analytics.js and fix redundant hostnames X-Git-Tag: release/2.19.40-1~11^2~2 X-Git-Url: https://git.donarmstrong.com/?p=lilypond.git;a=commitdiff_plain;h=9580a231b3d3f912f46066009114a2929ecbb16a 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 --- 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