今日折腾了一番Hexo,发现在发布后必须添加/index.html才能访问
如我的域名xxx.com
则直接访问http://xxx.com/显示404
而访问http://xxx.com/index.html/则为正常的hexo渲染页面
请问这是为什么,该如何解决?
今日折腾了一番Hexo,发现在发布后必须添加/index.html才能访问
如我的域名xxx.com
则直接访问http://xxx.com/显示404
而访问http://xxx.com/index.html/则为正常的hexo渲染页面
请问这是为什么,该如何解决?
我也这种情况,如果你之前可以正常访问的话
先查看github主目录是否有index.html
删掉.deploy_git文件夹,重新hexo clean,hexo g,hexo d
如果是第一次的话,我也不知道了
参考一下我的配置文件路径
url: http://www.bluedream.top/
root: /
deploy:
type: git
repo: https://github.com/qw8/qw8.git
branch: master
跟你用了哪种后台语言和框架无关。用了web服务器吗?如果是nginx,要配置location:
location / {
try_files $uri $uri/index.html;
}
如果是apache,可以配置.htaccess文件