diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-07-01 20:08:35 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-07-01 20:08:35 +0100 |
commit | 6e0192caf51ed558fd58c74ab9edb2ef566a0ed3 (patch) | |
tree | b5a13db1f3a7b854e72705aa55558d63f1d41ddc | |
parent | 1b1faa30ce85b1d0436750d613c6f562bbee91b4 (diff) |
No robot indexing on staging sites, and canonical link from OSM version back to www.
-rw-r--r-- | perllib/FixMyStreet/App.pm | 4 | ||||
-rw-r--r-- | templates/web/default/common_header_tags.html | 2 | ||||
-rw-r--r-- | templates/web/default/header.html | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm index 90f1f24bc..29d224268 100644 --- a/perllib/FixMyStreet/App.pm +++ b/perllib/FixMyStreet/App.pm @@ -181,6 +181,10 @@ sub setup_request { Memcached::set_namespace( FixMyStreet->config('BCI_DB_NAME') . ":" ); my $map = $host =~ /^osm\./ ? 'OSM' : $c->req->param('map'); + #if ($c->sessionid) { + # $map = $c->session->{map}; + # $map = undef unless $map eq 'OSM'; + #} FixMyStreet::Map::set_map_class( $map ); return $c; diff --git a/templates/web/default/common_header_tags.html b/templates/web/default/common_header_tags.html index e69dac27d..aa06efbd0 100644 --- a/templates/web/default/common_header_tags.html +++ b/templates/web/default/common_header_tags.html @@ -6,6 +6,8 @@ [% IF robots %] <meta name="robots" content="[% robots %]"> +[% ELSIF c.config.STAGING_SITE %] + <meta name="robots" content="noindex,nofollow"> [% END %] [% IF rss %] diff --git a/templates/web/default/header.html b/templates/web/default/header.html index 4221de86b..431e6db65 100644 --- a/templates/web/default/header.html +++ b/templates/web/default/header.html @@ -9,6 +9,10 @@ <style type="text/css">@import url("/css/ie6.css");</style> <![endif]--> + [% IF c.req.uri.host == 'osm.fixmystreet.com' %] + <link rel="canonical" href="http://www.fixmystreet.com[% c.req.uri.path_query %]"> + [% END %] + </head> <body> |