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

阅读 129

2022-05-31

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)

0 0 举报