【问题标题】:My wordpress shows apache2 ubuntu default web page "it works" in remote hosting我的 wordpress 在远程托管中显示 apache2 ubuntu 默认网页“它可以工作”
【发布时间】:2015-10-04 05:20:29
【问题描述】:

最近我将我的本地 wordpress 网站上传到远程主机,我使用 gFTP,但我的主要 wordpress 页面总是向我显示远程主机中的 apache2 ubuntu 默认网页“它可以工作”。/wordpress/ 如果网络浏览器中的类型http://mywebsite.com/wordpress/ 出现我网站的链接部分(不是主页) 在这一点上我不知道该怎么做,也许在我的 wordpress 远程托管中更改 .htaccess,感谢任何帮助,提前谢谢你

【问题讨论】:

    标签: wordpress apache .htaccess hosting


    【解决方案1】:

    您正在接收 Apache Web 服务器默认页面。确保您已在 .htaccess 文件中设置默认页面。

    从 cPanel 中找到 .htaccess 文件并在编辑器中打开它。

    将以下代码粘贴到页面顶部以配置所需的索引页面。在下面的示例中,first.html 被设置为默认页面。

    #Alternate default index page
    DirectoryIndex first.html
    

    您还可以在配置中列出多个文件。该文件将从左到右读取并按该顺序检查它们。在以下示例中,将 index.htm、index.html 和 index.php 添加到列表中。首先服务器会检查 first.html,如果没有找到同名的文件,它会继续 index.htm 等等。

    #Alternate default index pages
    DirectoryIndex first.html index.htm index.html index.php
    

    请务必点击右上角的保存更改按钮以保存新的 .htaccess 配置。

    【讨论】:

    • 通过在 .htaccess 中设置 DirectoryIndex index.php 为我工作。
    【解决方案2】:

    转到您的数据库,然后在 wp-option 表中,将 home url 更改为您当前的域名。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-10-28
      • 1970-01-01
      • 2013-11-19
      • 2020-04-29
      • 1970-01-01
      • 1970-01-01
      • 2015-12-30
      • 1970-01-01
      相关资源
      最近更新 更多