【发布时间】:2026-02-24 00:30:02
【问题描述】:
如何根据域名设置路由?我想为不同的域名(不是子域)注册一些操作。
我需要复制的功能示例:
Route::any('www.domain1.com', 'Controler@Action1');
Route::any('www.domain2.com', 'Controler@Action2');
我无法在 .htaccess 中使用 URL 重写,因为我将域 ->路由映射存储在我的数据库中。
【问题讨论】:
标签: url-routing laravel