笑

加油

  • 财富值670
  • 威望值0
  • 总积分790

个人信息

  • 2019-10-24 已签到
    连续签到1天,获得了5个金钱
  • 2019-10-22 已签到
    连续签到1天,获得了5个金钱
  • 2019-10-20 已签到
    连续签到1天,获得了5个金钱
  • 2019-10-14 已签到
    连续签到1天,获得了5个金钱
  • 2019-10-10 已签到
    连续签到1天,获得了5个金钱
  • 2019-09-24 已签到
    连续签到2天,获得了10个金钱
  • 2019-09-23 已签到
    连续签到1天,获得了5个金钱
  • 回复了 的回答

    advanced 根目录根本不应该被访问到,url/指向的根目录应该是web目录

    最后这样做了。。

  • 2019-09-11 已签到
    连续签到1天,获得了5个金钱
  • 回复了 的回答

    1、首先开启rewrite重写。
    2、项目根目录新建.htaccess文件并写入:
    `
    Options -Indexes

    RewriteEngine on #RewriteCond %{REQUEST_URI} !uploads RewriteRule ^(.*)$ home/web/$1 [L]

    Deny accessing below extensions

    Order allow,deny Deny from all

    Deny accessing dot files

    RewriteRule (^.|/.) - [F]
    `

    3、在frontend/web目录下新建.htaccess文件,并写入:
    `
    Options +FollowSymLinks
    IndexIgnore /

    RewriteEngine on

    if a directory or a file exists, use it directly

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    otherwise forward it to index.php

    RewriteRule . index.php
    `

    这样即可实现rewrite重写。

    谢谢大佬,我试一下

主管 等级规则
790/1000
资料完整度
40/100
用户活跃度
0/100

Ta的关注

3

Ta的粉丝

3

Ta的访客

8