thinkphp6多应用配置路由

云游道人 2025-07-12 10 阅读 0评论

thinkphp6 多应用配置路由

第一步:在 config/app.php 绑定域名=》域名绑定index模块

// 域名绑定(自动多应用模式有效)
'domain_bind'      => ['www.tp6.com' =>  'index',],

第二步:在 app/index/route/app.php 创建路由文件

use think\facade\Route;

Route::get('nav$', 'Navigation/index');

未使用路由前的URL

http://www.tp6.com/index/navigation?id=8

使用路由后的URL

http://www.tp6.com/nav?id=8

发表评论

快捷回复: 表情:
Addoil Applause Badlaugh Bomb Coffee Fabulous Facepalm Feces Frown Heyha Insidious KeepFighting NoProb PigHead Shocked Sinistersmile Slap Social Sweat Tolaugh Watermelon Witty Wow Yeah Yellowdog
提交
评论列表 (有 0 条评论, 10人围观)

最近发表

热门文章

最新留言

热门推荐

标签列表