if ($host != 'gfw.upward-club.com') {
rewrite ^/(.*)$ https://gfw.upward-club.com/?url=$host$1 permanent;
}
public function index(Request $request)
{
$param = $request->param();
$url = $request->param('url');
//如果没有传递URL链接
if(!$url){
$data = [
'old_url' => 'https://gfw.upward-club.com/' ,
'new_url'=> 'https://gfw.upward-club.com/',
];
View::assign('data',$data);
}
$result = Db::name('idcmaster_gfwfree')->where('old_url',$url)->find();
if ($result){
View::assign('data',$result);
}else{
$data = [
'old_url' => 'https://gfw.upward-club.com/' ,
'new_url'=> 'https://gfw.upward-club.com/',
];
View::assign('data',$data);
}
return view();
}