mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-28 04:09:56 +03: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:
parent
7a28277196
commit
65bb5d44b6
2 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue