diff options
-rw-r--r-- | include/section_init.inc.php | 1 | ||||
-rw-r--r-- | index.php | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/include/section_init.inc.php b/include/section_init.inc.php index 3ddfafa32..954561a2f 100644 --- a/include/section_init.inc.php +++ b/include/section_init.inc.php @@ -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: @@ -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 // |