405notallowed簡單解決 出現methodnotallowedhttpexception怎么處理?
出現methodnotallowedhttpexception怎么處理?處理步驟:1。直接輸入get地址欄;2。用插件模擬post提交;3。輸入以下代碼:route::get(“/test”,arra
出現methodnotallowedhttpexception怎么處理?
處理步驟:
1。直接輸入get地址欄;
2。用插件模擬post提交;
3。輸入以下代碼:route::get(“/test”,array(“uses”=>”HomeController@getTest“”)Route::post(“/test”,array(“uses”=>”家庭控制器@ppTest")).
405NotAllowed?
狀態(tài)代碼405 method not allowed表示服務器已使用當前HTTP方法禁用請求。
應該注意的是,get和head方法不應該被禁止,當然它們不應該返回狀態(tài)代碼405。解決方案:有三種解決方案
1。將405錯誤代碼重定向到200:在nginx服務器{}中添加以下內容,root是站點的根目錄
2。將靜態(tài)文件接收到的post請求轉換為get方法。三。修改nginx源代碼,該源代碼位于/nginx source目錄/SRC/HTTP/modules/NGXHTTPuuu靜態(tài)uu模塊中。C、 查找以下代碼: