forked from Cavemanon/cavepaintings
using system php-fpm always gets us php5.3 ~_~
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
<?php
|
||||
// custom routing for stand-alone mode
|
||||
|
||||
if(php_sapi_name() != 'cli-server') {
|
||||
die('local testing only');
|
||||
}
|
||||
if(PHP_SAPI !== 'cli-server') die('cli only');
|
||||
|
||||
// warehouse files
|
||||
$matches = array();
|
||||
@@ -13,12 +10,12 @@ if(preg_match('/\/_(images|thumbs)\/([0-9a-f]{32}).*$/', $_SERVER["REQUEST_URI"]
|
||||
return true;
|
||||
}
|
||||
|
||||
// static files
|
||||
if(preg_match('/\.(?:png|jpg|jpeg|gif|css|js)$/', $_SERVER["REQUEST_URI"])) {
|
||||
// use the default handler (serve static files, interpret php files)
|
||||
if(preg_match('/\.(?:png|jpg|jpeg|gif|css|js|php)(\?.*)?$/', $_SERVER["REQUEST_URI"])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// all other requests
|
||||
// all other requests (use shimmie routing based on URL)
|
||||
$_SERVER["PHP_SELF"] = '/';
|
||||
$_GET['q'] = $_SERVER["REQUEST_URI"];
|
||||
require_once "index.php";
|
||||
|
Reference in New Issue
Block a user