【问题标题】:index.html is not loading as default home pageindex.html 未作为默认主页加载
【发布时间】:2016-01-06 00:37:12
【问题描述】:

我已提议通过托管朋友的网站来帮助他们(使用我的 iPage 帐户),但是有一个问题我无法解决。首页FirstnameSurname.com返回404错误。

名称指针工作正常,因为我可以访问 www.FirstnameSurname.com/index.html,但是当尝试加载 www.FirstnameSurname.com 时,它返回 404。

我已尝试将文件夹名称(在服务器上)从 FSurname 更改为 FirstnameSurname,使其与域匹配,但无法解决任何问题。

在 htcaccess 文件中四处寻找我也无法修复它,即使添加了DirectoryIndex index.html

发生了什么事?我该如何解决这个问题?非常感谢任何帮助!

【问题讨论】:

    标签: html server hosting


    【解决方案1】:

    这可能适用于 htaccess

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule . index.html [L]
    

    【讨论】:

    • 我不知道这是什么巫术或它是如何工作的,但确实如此。惊人的。谢谢!
    猜你喜欢
    • 2023-04-01
    • 2015-02-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多