I am trying to redirect wildcard Doman with a url. But Facing issue Many Time Redirection. Here is my code
Route::group(['domain' => '{name}.example.com'], function (){
Route::get('', function($name){
$name = DB::table('users')->where('name', $name)->first();
return redirect('https://'.$name->name.'.example.com/?ref='.$name->id);
});
});
Issues: When I am tryign to redirect return redirect('https://'.$name->name.'.example.com/?ref='.$name->id)
it's showing many time redirection issue. But when I change return redirect('https://www'.$name->name.'.example.com/?ref='.$name->id);
It's working but it's not working with http, Any away to redirect on same url.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire