[SITE] unify config between projects, updated htaccess
This commit is contained in:
parent
1e29916915
commit
f1468a2af8
5 changed files with 37 additions and 32 deletions
|
@ -24,31 +24,6 @@ c::set('smartypants.doublequote.close', '“');
|
|||
|
||||
c::set('ssl', true);
|
||||
|
||||
c::set('routes', array(
|
||||
array(
|
||||
'pattern' => 'sitemap.xml',
|
||||
'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');
|
||||
}
|
||||
}
|
||||
)
|
||||
));
|
||||
|
||||
/*
|
||||
Modules Configuration
|
||||
*/
|
||||
|
@ -86,3 +61,31 @@ Piwik Plugin configuration
|
|||
c::set('spicy.piwik.active', true);
|
||||
c::set('spicy.piwik.url', 'https://jannikb.aquila.uberspace.de/piwik');
|
||||
c::set('spicy.piwik.id', 2);
|
||||
|
||||
/*
|
||||
Routes
|
||||
*/
|
||||
c::set('routes', array(
|
||||
array(
|
||||
'pattern' => 'sitemap.xml',
|
||||
'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');
|
||||
}
|
||||
}
|
||||
)
|
||||
));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue