forked from recess/recess
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
23 lines (20 loc) · 772 Bytes
/
index.php
File metadata and controls
23 lines (20 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
/**
* This file allows your recess application to work without .htaccess
* by using the following url: http://www.somehost.com/index.php/path/to/your/app
*
* This is discouraged over using a proper .htaccess rewrite.
*
* Once .htaccess is working go ahead and delete this file.
*
* @author Kris Jordan <krisjordan@gmail.com>
*/
define('INDEX_PHP','index.php');
$pos = strpos($_SERVER['PHP_SELF'], INDEX_PHP);
$base = substr($_SERVER['PHP_SELF'], 0, $pos + strlen(INDEX_PHP));
$_ENV['url.assetbase'] = str_replace(INDEX_PHP,'',$base);
$_SERVER['PHP_SELF'] = $base . '/bootstrap.php';
$pos = strpos($_SERVER['REQUEST_URI'], INDEX_PHP);
$_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'],$pos + strlen(INDEX_PHP));
require_once('bootstrap.php');
?>