mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-05-05 21:12:52 +02:00
feature 2368: better canonical URL for homepage
git-svn-id: http://piwigo.org/svn/trunk@13458 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -157,6 +157,7 @@ if ( !isset($page['section']) )
|
||||
redirect($random_index_redirect[mt_rand(0, count($random_index_redirect)-1)]);
|
||||
}
|
||||
}
|
||||
$page['is_homepage'] = true;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
10
index.php
10
index.php
@@ -89,7 +89,15 @@ if (isset($_GET['caddie']))
|
||||
redirect(duplicate_index_url());
|
||||
}
|
||||
|
||||
$template->assign('U_CANONICAL', duplicate_index_url());
|
||||
if (isset($page['is_homepage']) and $page['is_homepage'])
|
||||
{
|
||||
$canonical_url = get_gallery_home_url();
|
||||
}
|
||||
else
|
||||
{
|
||||
$canonical_url = duplicate_index_url();
|
||||
}
|
||||
$template->assign('U_CANONICAL', $canonical_url);
|
||||
|
||||
//----------------------------------------------------- template initialization
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user