webman 請(qǐng)求URL如何設(shè)置不區(qū)分大小寫(xiě)
比如請(qǐng)求 http://127.0.0.1:8787/api/index/index
http://127.0.0.1:8787/Api/Index/index
也能請(qǐng)求,現(xiàn)在返回404
默認(rèn)路由不區(qū)分大小寫(xiě),手動(dòng)設(shè)置路由估計(jì)區(qū)分大小寫(xiě)
為什么webman的url是區(qū)分大小寫(xiě)的?
//a: 因?yàn)閣ebman的路由是由fast-route來(lái)實(shí)現(xiàn)的,fast-route的路由是區(qū)分大小寫(xiě)的。
// 如果需要忽略大小寫(xiě),可以在Route::any()中加上第四個(gè)參數(shù)true,表示忽略大小寫(xiě)。
// Route::any('/index.html', [app\controller\IndexController::class, 'index'], 'index', true);
// 如果需要全部忽略大小寫(xiě),可以在config\route.php中加上第四個(gè)參數(shù)true,表示忽略大小寫(xiě)。
// Route::any('/index.html', [app\controller\IndexController::class, 'index'], 'index', true);
// Route::any('/Index.html', [app\controller\IndexController::class, 'index'], 'index', true);
用默認(rèn)的自動(dòng)路由不區(qū)分大小寫(xiě),手動(dòng)配置路由一直沒(méi)用不過(guò)按照LV的尿性估計(jì)這個(gè)也區(qū)分大小寫(xiě)