2017-07-21 36 views
0

我具有由Laravel 5.3 在這樣的(http://example.com/foo) 一個虛擬目錄中IIS託管製成我有兩個路由到基礎URL的應用程序力斜線上laravel應用基本URL

Route::get('/', ['as' => 'jobs.index', 'uses' => '[email protected]']); 
Route::post('/', ['as' => 'jobs.index', 'uses' => '[email protected]']); 

當我使用URL :: to('/')的形式我總是得到http://example.com/foo我想得到http://example.com/foo/,因爲第一次拋出405 - 方法不允許錯誤。

有什麼解決辦法嗎?

+0

而在你使用POST的形式? – Maraboc

+0

如果您嘗試使用其他方法,該怎麼辦?如:''uses'=>'FrontController @ store'' –

+1

你可能想從IIS繼承一個堆棧溢出URL https://serverfault.com/questions/669841/using-iis-http-redirect-feature-讓 - 非尾隨斜線換子文件夾 –

回答

0

使用

Route::any(「/「, [「as」 => 「jobs.index」, 'uses' => '[email protected]']);