若依 前端框架部署 apache 代替nginx的try_file
作者:互联网
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>
加粗的就是
标签:index,default,htm,FILENAME,try,nginx,html,file,RewriteCond 来源: https://www.cnblogs.com/zonglonglong/p/16285699.html