1
0
Fork 0

[SITE CONFIG] redirect old feature urls to new urls + exclude redirect pages from sitemap

This commit is contained in:
Jannik Beyerstedt 2016-04-18 00:29:13 +02:00
parent 24c7efc386
commit eed3847c98

View file

@ -27,6 +27,22 @@ c::set('routes', array(
'action' => function() {
return site()->visit('sitemap');
}
),
// redirect legacy urls:
// feature/webdesign -> webdesign
// feature/fotografie -> fotografie
// feature/fotografie/(:any) -> fotografie/(:any)
array(
'pattern' => 'feature/(:all)',
'action' => function($uid) {
if (site()->find($uid)) {
$target = site()->find($uid)->url();
header::redirect($target, 301);
}else {
go('error');
}
}
)
));
@ -53,7 +69,7 @@ c::set('columns.item', 'col-sm-6 columns');
// enhanced sitemap by Jannik Beyerstedt:
c::set('smap_ignoreSite', array('sitemap', 'error', 'home'));
c::set('smap_ignoreTemplate', array('carousel'));
c::set('smap_ignoreTemplate', array('carousel', 'redirect'));
c::set('smap_heading_visible', 'Hauptmenü');
c::set('smap_heading_invisible', 'weitere Seiten');
//c::set('smap_column_class_id', 'class="foo" id="bar"');