2016-07-28 2 views
4

内のリンクNotFoundHttpException外で私はLaravel 5アプリを開発しています、私はこのルートLaravel5:リダイレクト::()にRouteCollection.php

Route::get('/go','[email protected]'); 

と、このUrlController.phpでを持って、私は、このインデックスメソッドを持っています私はこのURLをテストするとき

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

http://localhost:8000/go はそれだけでhttp://localhost:8000/www.google.comに変更しNotFoundHttpException in RouteCollection.php line 161 ので、問題が何であるか、おかげ

をこのエラーを持っています
+0

は、HTTPを追加しようとする前にプロトコルを追加する必要があります://正しいのですwww.google.com – LudgerP

答えて

3

www.google.com

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

の前に、感謝を –

関連する問題