laravel - Laravel5:Redirect::to() outside link NotFoundHttpException in RouteCollection.php -


i'm developing laravel 5 app, have route

route::get('/go','urlcontroller@index'); 

and in urlcontroller.php,i have index method

public function index(){     return redirect::to('www.google.com',302); } 

when test url http://localhost:8000/go change http://localhost:8000/www.google.com , have error notfoundhttpexception in routecollection.php line 161 problem , thanks

you should add protocol before www.google.com

public function index(){     return redirect::to('https://www.google.com',302); } 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -