若依 前端框架部署 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>

 

加粗的就是

posted @   西瓜霜  阅读(641)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
历史上的今天:
2018-05-18 thinkphp 3.2,引入第三方类库的粗略记录
2016-05-18 text输入框改变事件
点击右上角即可分享
微信分享提示