1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

Experimental url creation code added.

This commit is contained in:
Cameron
2014-06-06 02:39:44 -07:00
parent f0d379ef28
commit e21ae16edd
2 changed files with 27 additions and 2 deletions

View File

@@ -88,20 +88,27 @@
$sql->db_Mark_Time("Start Simple URL-ReWrite Routine");
$tmp = e107::getAddonConfig('e_url');
$req = str_replace(e_HTTP,'', e_REQUEST_URI);
if(count($tmp))
{
foreach($tmp as $plug=>$cfg)
{
foreach($cfg as $k=>$v)
{
$req = str_replace(e_HTTP,'', e_REQUEST_URI);
$regex = '#'.$v['regex'].'#';
if($newLocation = preg_replace($regex,$v['redirect'],$req))
$newLocation = preg_replace($regex, $v['redirect'], $req);
if($newLocation !=$req)
{
$redirect = e107::getParser()->replaceConstants($newLocation);
list($file,$query) = explode("?",$redirect,2);
parse_str($query,$_GET);
// echo " file=".$file;
include_once($file);
//print_a($_GET);
exit;