0
点赞
收藏
分享

微信扫一扫

若依 前端框架部署 apache 代替nginx的try_file

是归人不是过客 2022-05-31 阅读 129

ngin是这样的

location / {
    try_files $uri $uri/ /index.html;
      index  index.html index.htm;
    }

apache是这样的

<Directory "/www/wwwroot/XXX.com">
RewriteEngine on 
        RewriteCond %{REQUEST_FILENAME} !-f 
        RewriteCond %{REQUEST_FILENAME} !-d 
        RewriteRule . index.html [L] 
        SetOutputFilter DEFLATE
        Options FollowSymLinks
        AllowOverride All
        Require all granted
        DirectoryIndex index.php index.html index.htm default.php default.html default.htm
    </Directory>

加粗的就是

破罐子互摔

举报

相关推荐

0 条评论