【问题标题】:My website is forwarding to /public_html without reason我的网站无故转发到 /public_html
【发布时间】:2019-07-08 19:19:17
【问题描述】:

前段时间我想把我的网站从 http:// 转发到 https:// 我用一些代码编辑了 .htaccess 文件,但它不起作用,我删除了 .htaccess。 现在,没有 .htaccess 文件,它会自动重定向到 /public_html/ 文件夹。请帮忙,谢谢。

【问题讨论】:

    标签: .htaccess http https forwarding


    【解决方案1】:

    使用示例重写创建 .htaccess 文件并检查它是否有效

    RewriteEngine On
    RewriteBase /
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-04-14
      • 2020-07-20
      • 2014-10-05
      • 1970-01-01
      • 2015-09-04
      • 1970-01-01
      • 2022-08-05
      相关资源
      最近更新 更多