support nginx rewrite

This commit is contained in:
October 2014-07-30 13:22:34 +08:00
parent 77d40b0b5c
commit 2b5584b223

View File

@ -83,7 +83,9 @@ class Url{
$custom = array();
if( !self::$url ){
if( c('static_url') ){
self::$url = isset($_SERVER['REDIRECT_URL'])&&$_SERVER['REDIRECT_URL']?$_SERVER['REDIRECT_URL']:$_SERVER['PATH_INFO'];
//self::$url = isset($_SERVER['REDIRECT_URL'])&&$_SERVER['REDIRECT_URL']?$_SERVER['REDIRECT_URL']:$_SERVER['PATH_INFO'];
self::$url = trim( current( explode('?', $_SERVER['REQUEST_URI'])), '/' );
self::$url = ltrim( self::$url, trim( self::URLBASE , '/' ) );
}else{
self::$url = $_GET;
}