summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2014-02-20 11:14:56 +0000
committerGreg Roach <fisharebest@gmail.com>2014-02-20 11:14:56 +0000
commit7cd1d80619dfeae38fe46b8d041844fe583d30d3 (patch)
tree5ba7549133f572ad0940207856185e3c222ededb
parent8d700df09bfad35825fa26d8e9e9297ae726bb3d (diff)
downloadwebtrees-7cd1d80619dfeae38fe46b8d041844fe583d30d3.tar.gz
webtrees-7cd1d80619dfeae38fe46b8d041844fe583d30d3.tar.bz2
webtrees-7cd1d80619dfeae38fe46b8d041844fe583d30d3.zip
#106 - SEO tweaks to home page
-rw-r--r--index.php1
-rw-r--r--robots-example.txt2
2 files changed, 3 insertions, 0 deletions
diff --git a/index.php b/index.php
index 939a29e0c4..7cc0221432 100644
--- a/index.php
+++ b/index.php
@@ -86,6 +86,7 @@ if ($ctype=='user') {
$controller
->setPageTitle($ctype=='user' ? WT_I18N::translate('My page') : WT_TREE_TITLE)
->setMetaRobots('index,follow')
+ ->setCanonicalUrl(WT_SCRIPT_NAME . '?ctype=' . $ctype . '&amp;ged=' . WT_GEDCOM)
->pageHeader()
// By default jQuery modifies AJAX URLs to disable caching, causing JS libraries to be loaded many times.
->addInlineJavascript('jQuery.ajaxSetup({cache:true});');
diff --git a/robots-example.txt b/robots-example.txt
index eb8ea7bee0..d7306cdcf8 100644
--- a/robots-example.txt
+++ b/robots-example.txt
@@ -23,6 +23,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# Well-behaved robots understand "Allow" directives.
+# Google (plus some others?) understands the "$" pattern match
User-Agent: bingbot # Bing
User-Agent: Googlebot # Google
User-Agent: ia_archiver # Internet Archive "wayback" machine
@@ -44,6 +45,7 @@ Allow: /repo.php
Allow: /site-offline.php
Allow: /site-unavailable.php
Allow: /source.php
+Allow: /$
Disallow: /
# Disallow all other robots