url->register('alias','','^(.*)$',array('urlAlias','alias')); class urlAlias extends dcUrlHandlers { public static function alias($args) { $o = new dcAliases($GLOBALS['core']); $aliases = $o->getAliases(); foreach ($aliases as $v) { if (@preg_match('#^/.*/$#',$v['alias_url']) && @preg_match($v['alias_url'],$args)) { self::callAliasHandler(preg_replace($v['alias_url'],$v['alias_destination'],$args)); return; } elseif ($v['alias_url'] == $args) { self::callAliasHandler($v['alias_destination']); return; } } self::callAliasHandler($args); } public function callAliasHandler($part) { global $core; $core->url->unregister('alias'); $core->url->getArgs($part,$type,$args); global $core; if (!$type) { $core->url->callDefaultHandler($args); } else { $core->url->callHandler($type,$args); } } } ?>