// visit the currently active page $page = ($lang)? $site->visit($path, $lang) : $site->visit($path); // redirections for files and invalid representations if($site->representation !== null) { // get the filename $filename = rawurldecode(basename($path)); $pagepath = dirname($path); // check if there's a page for the parent path if($parent = $site->find($pagepath)) { // check if there's a file for the last element of the path if($file = $parent->file($filename)) { return go($file->url()); } } // prevent invalid representation routes if($site->representation === '' || $site->representation != $page->representation()) { return $site->errorPage(); } } return $page; }; // tinyurl handling $routes['tinyurl'] = $this->component('tinyurl')->route(); // home redirect $routes['homeRedirect'] = array( 'pattern' => $this->options['home'] . '(\..*)?', 'action' => function($extension = null) { // ignore invalid extensions if($extension === '.') $extension = ''; redirect::send(url::build([
/** * Facepalm typo alias * @see csrf() */ function csfr() { return call('csrf', func_get_args()); } /** * Shortcut for call_user_func_array with a better handling of arguments * * @param mixed $function * @param mixed $arguments * @return mixed */ function call($function, $arguments = array()) { if(!is_callable($function)) return false; if(!is_array($arguments)) $arguments = array($arguments); return call_user_func_array($function, $arguments); } /** * Parses yaml structured text * * @param $string * @return array */ function yaml($string) { return yaml::decode($string); } /** * Simple email sender helper * * @param array $params * @return Email */ function email($params = array()) { return new Email($params);
// load all plugins $this->plugins(); // start the router $this->router = new Router($this->routes()); $this->route = $this->router->run(trim($this->path(), '/')); // check for a valid route if(is_null($this->route)) { header::status('500'); header::type('json'); die(json_encode(array( 'status' => 'error', 'message' => 'Invalid route or request method' ))); } // call the router action with all arguments from the pattern $response = call($this->route->action(), $this->route->arguments()); // load all language variables // this can only be loaded once the router action has been called // otherwise the current language is not yet available $this->localize(); // build the response $this->response = $this->component('response')->make($response); // store the current language in the session if( $this->option('language.detect') && $this->site()->multilang() && $this->site()->language() ) { s::set('kirby_language', $this->site()->language()->code()); } return $this->response;
<?php define('DS', DIRECTORY_SEPARATOR); // load kirby require(__DIR__ . DS . 'kirby' . DS . 'bootstrap.php'); // check for a custom site.php if(file_exists(__DIR__ . DS . 'site.php')) { require(__DIR__ . DS . 'site.php'); } else { $kirby = kirby(); } // render echo $kirby->launch();
Key | Value |
Kirby Toolkit | v2.5.14 |
Kirby CMS | v2.5.14 |
Key | Value |
PHPSESSID | cbe5b0fed6ec7bfbfabbc1391e5603d7 |
Key | Value |
USER | jvls-gp.de |
HOME | /var/www/vhosts/jvl-gp.de |
SCRIPT_NAME | /index.php |
REQUEST_URI | /media/pdf/KOOP_FOES_Innen.pdf?PHPSESSID=cbe5b0fed6ec7bfbfabbc1391e5603d7 |
QUERY_STRING | PHPSESSID=cbe5b0fed6ec7bfbfabbc1391e5603d7 |
REQUEST_METHOD | GET |
SERVER_PROTOCOL | HTTP/1.0 |
GATEWAY_INTERFACE | CGI/1.1 |
REDIRECT_QUERY_STRING | PHPSESSID=cbe5b0fed6ec7bfbfabbc1391e5603d7 |
REDIRECT_URL | /media/pdf/KOOP_FOES_Innen.pdf |
REMOTE_PORT | 58430 |
SCRIPT_FILENAME | /var/www/vhosts/jvl-gp.de/httpdocs/index.php |
SERVER_ADMIN | [no address given] |
CONTEXT_DOCUMENT_ROOT | /var/www/vhosts/jvl-gp.de/httpdocs |
CONTEXT_PREFIX | |
REQUEST_SCHEME | https |
DOCUMENT_ROOT | /var/www/vhosts/jvl-gp.de/httpdocs |
REMOTE_ADDR | 44.222.90.25 |
SERVER_PORT | 443 |
SERVER_ADDR | 81.90.42.16 |
SERVER_NAME | www.jvl-gp.de |
SERVER_SOFTWARE | Apache |
SERVER_SIGNATURE | <address>Apache Server at www.jvl-gp.de Port 443</address> |
PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin |
HTTP_REFERER | http://jvl-gp.de/media/pdf/KOOP_FOES_Innen.pdf?PHPSESSID=cbe5b0fed6ec7bfbfabbc1391e5603d7 |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
HTTP_CONNECTION | close |
HTTP_X_ACCEL_INTERNAL | /internal-nginx-static-location |
HTTP_X_REAL_IP | 44.222.90.25 |
HTTP_HOST | www.jvl-gp.de |
proxy-nokeepalive | 1 |
HTTPS | on |
SCRIPT_URI | https://www.jvl-gp.de/media/pdf/KOOP_FOES_Innen.pdf |
SCRIPT_URL | /media/pdf/KOOP_FOES_Innen.pdf |
UNIQUE_ID | ZgalG4R6mlIiU@25nuw4uAAAAFM |
REDIRECT_STATUS | 200 |
REDIRECT_HTTPS | on |
REDIRECT_SCRIPT_URI | https://www.jvl-gp.de/media/pdf/KOOP_FOES_Innen.pdf |
REDIRECT_SCRIPT_URL | /media/pdf/KOOP_FOES_Innen.pdf |
REDIRECT_UNIQUE_ID | ZgalG4R6mlIiU@25nuw4uAAAAFM |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711711515.1887 |
REQUEST_TIME | 1711711515 |