Menu

#4813 replace urchin.js with analytics.js and fix redundant hostnames

Verified
push
Enhancement
2016-05-12
2016-03-25
No

Report:
http://lists.gnu.org/archive/html/lilypond-devel/2016-03/msg00158.html

This is part of the work on issue [#3715].

I've started looking at Analytics, which gives two warnings:

  • We are using the old script urchin.js, which was replaced by analytics.js
$ git grep urchin.js
scripts/build/website_post.py:<script src="http://www.google-analytics.com/urchin.js";

More information on:
https://developers.google.com/analytics/devguides/collection/analyticsjs/

  • Redundant hostnames

Currently it's possible to visit either lilypond.org and www.lilypond.org.
We should make a choice and set up a 301 redirect in Apache htaccess.
I'm for lilypond.org (without www). This was recently discussed when talking about the tagline:
http://lists.gnu.org/archive/html/lilypond-devel/2016-02/msg00148.html

Related

Issues: #3715

Discussion

  • Federico Bruni

    Federico Bruni - 2016-03-25

    I'm used to nginx, which has a simpler syntax. I need that somebody review and check the change to the htaccess file.

    There are many ways to redirect from www to non-www in Apache. Maybe the best one is what it's described at the end of this section, which is actually an example of the opposite redirection, so it should be adapted.

    I would rewrite it like this. What do you think?

    RewriteCond "%{HTTP_HOST}" "^www\." [NC]
    RewriteRule "^/?(.*)"      "http://%{HTTP_HOST}/$1" [L,R=301,NE]
    

    This should be tested manually on the server before pushing.

     
  • Federico Bruni

    Federico Bruni - 2016-03-30

    issue 4813: replace urchin.js with analytics.js and fix redundant hostnames

    The change to the htaccess file should be tested manually on the server
    before pushing this patch to staging.

    http://codereview.appspot.com/294020043

     
  • Federico Bruni

    Federico Bruni - 2016-03-30
    • labels: --> SEO
    • Needs: -->
    • Patch: new --> review
    • Type: --> Maintainability
     
  • Phil Holmes

    Phil Holmes - 2016-03-30

    So do you want me to edit .htaccess manually? How should it be tested?

     
  • Federico Bruni

    Federico Bruni - 2016-03-30

    Yes please, just add the two lines on the file on the server and let's see if accessing www.lilypond.org (and any other www.lilypond.org/whatever link) is redirected to lilypond.org or lilypond.org/whatever

     
  • Phil Holmes

    Phil Holmes - 2016-03-30

    Right. I think I now have this working. The current .htaccess syntax can be seen at:

    http://lilypond.org/hta.txt

    If anyone is having problems accessing any of the lilypond website, please let me know.

     
  • Federico Bruni

    Federico Bruni - 2016-03-30

    Fix the RewriteRule (thanks to Phil)

    http://codereview.appspot.com/294020043

     
  • Anonymous

    Anonymous - 2016-04-01
    • Needs: -->
    • Type: --> Enhancement
     
  • Anonymous

    Anonymous - 2016-04-01

    Passes Make , make check and a full make doc.

     
  • Anonymous

    Anonymous - 2016-04-01
    • Patch: new --> review
     
  • Anonymous

    Anonymous - 2016-04-03
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2016-04-03

    Patch on countdown for April 6th.

     
  • Anonymous

    Anonymous - 2016-04-06
    • Patch: countdown --> push
     
  • Anonymous

    Anonymous - 2016-04-06

    Patch counted down - please push

     
  • Federico Bruni

    Federico Bruni - 2016-04-07

    pushed to staging:
    9580a231b3d3f912f46066009114a2929ecbb16a

     
  • Federico Bruni

    Federico Bruni - 2016-04-07
    • labels: --> Fixed_2_19_40
    • status: Started --> Fixed
     
  • Federico Bruni

    Federico Bruni - 2016-05-12
    • status: Fixed --> Verified
     
MongoDB Logo MongoDB