This commit is contained in:
wangmingqing 2023-05-30 14:22:34 +08:00
parent eab9495462
commit e147b03565

View File

@ -1,19 +1,8 @@
<?php
$router = $di->getRouter();
if(!empty($_SERVER['HTTP_HOST']) && (preg_match("@weapp\.wemediacn@", strtolower($_SERVER['HTTP_HOST'])))){
if(!empty($_SERVER['REQUEST_URI']) && preg_match("@\/([a-z0-9]{1,20})\/stretch@", strtolower($_SERVER['REQUEST_URI']), $matches)){
$custom_dir = $matches[1];
$router->add(
"/{$custom_dir}/tiffany/api/:controller/:action/:params",
array(
"controller"=>1,
"action"=>2,
"params"=>3
)
);
}else{
if(!empty($_SERVER['REQUEST_URI'])&& (preg_match("@\/d\/@", strtolower($_SERVER['REQUEST_URI'])) || preg_match("@\/smsoauth2_qa\/@", strtolower($_SERVER['REQUEST_URI']))) )
{
$router->add(
"/d/tiffany/api/:controller/:action/:params",
array(
@ -70,8 +59,6 @@ if(!empty($_SERVER['HTTP_HOST']) && (preg_match("@weapp\.wemediacn@", strtolower
"action" => 'shorturl',
)
);
}
}
else{
$router->add(