我完全按照教程操作了
然后再修改 \application\route.php 查找里边类似的代码
Route::group(['name'=>'bbs','ext'=>'html','__domain__'=>'thinkphp'], [
'show-<id>' =>['bbs/content/show',['method'=>'get'],['id' => '\d+']],
'list-<fid>'=>['bbs/content/index',['method'=>'get'],['fid' => '\d+']],
'mid-<mid>'=>['bbs/content/index',['method'=>'get'],['mid' => '\d+']],
'show' => 'bbs/content/show',
'list' => 'bbs/content/index',
'index$' => 'bbs/index/index',
]);
把他删除,换成下面的代码
Route::domain('bbs',[
'show-<id>' =>['bbs/content/show',['method'=>'get'],['id' => '\d+']],
'list-<fid>'=>['bbs/content/index',['method'=>'get'],['fid' => '\d+']],
'mid-<mid>'=>['bbs/content/index',['method'=>'get'],['mid' => '\d+']],
'show' => 'bbs/content/show',
'list' => 'bbs/content/index',
'index$' => 'bbs/index/index',
'/$' => 'bbs/index/index',
]);
这个步骤我已经操作了,为什么路由规则仍然没有生效
访问bbs.10010000.cc和bbs.10010000.cc/index.html仍然是访问网站首页,但访问bbs.10010000.cc/bbs/index/index.html则能直接访问频道主页,
群模块也是如此:
访问qun.10010000.cc和qun.10010000.cc/index.html仍然是访问网站首页,但访问qun.10010000.cc/bbs/index/index.html则能直接访问频道主页