[SITE] unify config between projects, updated htaccess
This commit is contained in:
parent
1e29916915
commit
f1468a2af8
|
@ -9,10 +9,13 @@ RewriteBase /
|
|||
RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L]
|
||||
|
||||
# block all files in the site folder from being accessed directly
|
||||
# except for requests to plugin assets files
|
||||
#RewriteRule ^assets/plugins/([a-zA-Z0-9\.\-_%=]+)/(.*)$ site/plugins/$1/assets/$2 [L,N]
|
||||
#RewriteCond $1 !^plugins/[a-zA-Z0-9\.\-_%=]+/assets/.*
|
||||
RewriteRule ^site/(.*) index.php [L]
|
||||
|
||||
# block all files in the kirby folder from being accessed directly
|
||||
RewriteRule ^kirby/(.*) index.php [L]
|
||||
# block direct access to kirby and the panel sources
|
||||
RewriteRule ^(kirby|panel\/app|panel\/tests)/(.*) index.php [L]
|
||||
|
||||
# make panel links work
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
# robots.txt for jannikbeyerstedt.de
|
||||
|
||||
User-agent: *
|
||||
Disallow: /kirby/
|
||||
Disallow: /panel/
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
)
|
||||
));
|
||||
|
|
|
@ -6,10 +6,11 @@
|
|||
* copyright: Jannik Beyerstedt | http://jannikbeyerstedt.de | code@jannikbeyerstedt.de
|
||||
* license: http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 License
|
||||
*
|
||||
* version 2.0.1 (09.01.2015)
|
||||
* version 2.0.2 (12.12.2016)
|
||||
* changelog:
|
||||
* - v2.0: kirby 2 support
|
||||
* - v2.0.1: fix some html validation issues with & symbols
|
||||
* - v2.0.2: html5 player is now default, so no url param needed any more
|
||||
*/
|
||||
|
||||
kirbytext::$tags['html5youtube'] = array(
|
||||
|
@ -18,7 +19,7 @@ kirbytext::$tags['html5youtube'] = array(
|
|||
),
|
||||
'html' => function($tag) {
|
||||
$base = 'https://www.youtube-nocookie.com/embed/';
|
||||
$end = '?rel=0&html5=1';
|
||||
$end = '?rel=0';
|
||||
|
||||
$videoID = $tag->attr('html5youtube');
|
||||
$options = $tag->attr('options');
|
||||
|
|
Loading…
Reference in a new issue