mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-29 23:32:54 +09:00
Support different rewrite levels for XE compatibility
This commit is contained in:
parent
f01fb9ae42
commit
1cd3cfc7d9
7 changed files with 42 additions and 5 deletions
|
|
@ -50,6 +50,7 @@ return array(
|
|||
'http_port' => null,
|
||||
'https_port' => null,
|
||||
'ssl' => 'none',
|
||||
'rewrite' => 1,
|
||||
),
|
||||
'session' => array(
|
||||
'delay' => false,
|
||||
|
|
|
|||
28
common/framework/router.php
Normal file
28
common/framework/router.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace Rhymix\Framework;
|
||||
|
||||
/**
|
||||
* The router class.
|
||||
*/
|
||||
class Router
|
||||
{
|
||||
/**
|
||||
* Return the currently configured rewrite level.
|
||||
*
|
||||
* 0 = None
|
||||
* 1 = XE-compatible rewrite rules only
|
||||
* 2 = Full rewrite support
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public static function getRewriteLevel(): int
|
||||
{
|
||||
$level = Config::get('url.rewrite');
|
||||
if ($level === null)
|
||||
{
|
||||
$level = Config::get('use_rewrite') ? 1 : 0;
|
||||
}
|
||||
return intval($level);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue