X1运营交流
请问如何隐藏/cms/目录,非常感谢
615
5

Route::group(['name'=>'cms','ext'=>'html'], [

        'show-<id>' =>['cms/content/show',['method'=>'get'],['id' => '\d+']],

        'list-<fid>'=>['cms/content/index',['method'=>'get'],['fid' => '\d+']],

        'mid-<mid>'=>['cms/content/index',['method'=>'get'],['mid' => '\d+']],

        'show' => 'cms/content/show',

        'list' => 'cms/content/index',

        'index$' => 'cms/index/index',

]);

换成:

Route::group(['name'=>'/','ext'=>'html'], [

        'show-<id>' =>['cms/content/show',['method'=>'get'],['id' => '\d+']],

        'list-<fid>'=>['cms/content/index',['method'=>'get'],['fid' => '\d+']],

        'mid-<mid>'=>['cms/content/index',['method'=>'get'],['mid' => '\d+']],

        'show' => 'cms/content/show',

        'list' => 'cms/content/index',

        'index$' => 'cms/index/index',

]);

执行的是:/index.php/show-13.html  如何直接访问http://x1.php168.com/show-13.html ; 这样的地址呢,请高手指点,谢谢


2
赏礼
赏钱
收藏
点击回复
      全部留言
  • 5
  • 袁冬 普通粉丝 消费:160.85元 2021-02-03 13:13 13:13
    华为
    6楼
    你再把index. php
    隐藏就可以了吧
0 赏钱 赏礼回复
  • fkenuiabcd 风格开发者 消费:55.05元 2021-02-03 09:08 09:086楼
    Route::group(['ext'=>'html'], [
            'wen-<id>' =>['cms/content/show',['method'=>'get'],['id' => '\d+']],
            'list-<fid>'=>['cms/content/index',['method'=>'get'],['fid' => '\d+']],
    'subject-<fid>'=>['cms/category/index',['method'=>'get'],['fid' => '\d+']], //专题
            'mid-<mid>'=>['cms/content/index',['method'=>'get'],['mid' => '\d+']],
            'show' => 'cms/content/show',
            'list' => 'cms/content/index',
            'index$' => 'cms/index/index',
    ]);
    绿叶 消费:35.04元 2021-02-03 11:41
    谢谢,已解决
0 赏钱 赏礼回复
  • admin 超级管理员 消费:3.03元 2021-02-03 07:10 07:10
    其他手机
    6楼
    安装URL美化插件
    绿叶 消费:35.04元 华为 2021-02-03 07:39
    谢谢
0 赏钱 赏礼回复
更多回复
      你可能感兴趣的主题
恢复多功能编辑器
  • 3 1
  • X1运营交流
        圈内贴子51611
    • 圈子成员1014
    本圈子内的新贴

    推荐内容
    扫一扫访问手机版
    请选择要切换的马甲:

     
    网页即时交流
    QQ咨询
    咨询热线
    020-28998648