mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-09 08:02:48 +08:00
继续完善,对*的处理
This commit is contained in:
@@ -154,13 +154,18 @@ class Url
|
|||||||
$rule = is_array($rule) ? $rule[0] : $rule;
|
$rule = is_array($rule) ? $rule[0] : $rule;
|
||||||
if (false === strpos($key, '*') && 0 === strpos($url, $rule)) {
|
if (false === strpos($key, '*') && 0 === strpos($url, $rule)) {
|
||||||
$url = ltrim($url, $rule);
|
$url = ltrim($url, $rule);
|
||||||
|
$domain = $key;
|
||||||
// 生成对应子域名
|
// 生成对应子域名
|
||||||
if(!empty($urlDomainRoot)){
|
if(!empty($urlDomainRoot)){
|
||||||
$domain = $key . strstr($domain, '.');
|
$domain .= $urlDomainRoot;
|
||||||
}else{
|
|
||||||
$domain = $key;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}else if(false !== strpos($key, '*')){
|
||||||
|
$domain = str_replace('*',strstr($domain,'.',true),$key);
|
||||||
|
if(!empty($urlDomainRoot)){
|
||||||
|
$domain .= $urlDomainRoot;
|
||||||
|
}
|
||||||
|
echo $domain;exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user