Hi Lynrch,
Maybe this way will work.
Routing sub domain docs: https://laravel.com/docs/5.2/routing#route-group-sub-domain-routing
Steps:
views\errors\
|--404.blade.php (default 404 page for example.com)
|--404_subdomain.blade.php (404 page for sub.example.com)
// 404 route for example.com
Route::get('/something', function () { App::abort(404); });
// 404 route for sub.example.com
Route::group(['domain' => '{sub}.example.com'], function()
{
Route::get('/something-sub-domain', function() { return view('errors/404_subdomain'); } );
});
Hope this helps. :)
Hi Khoa, thank for your answer, but need more,something like when any error NotFoundHttpException in example.com response 404.blade and any error NotFoundHttpExceptio in sub.example.com response 404_subdomain.blade. And more for 403 500 .... :(
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community